I’ve been through the changelog but I’m not familiar enough with Ruby
internals to figure out which entry was relevant
I am not freezing msg, and I’m not modifying any other object with this.
Can someone help?
Sorry for the stupid looking prompt> prompt… apparently a corporate
crawler found some references to a couple of our machines from my posts to
this list archived on the web. I guess our machine names are confidentail
Well, it may work, but Ruby makes decisions on whether something is a class,
constant, variable, etc. based on leading caps. You aren’t competely free to
name things as you see fit.
irb(main):013:0> def DoIt; puts “done”; end
NameError: uninitialized constant DoIt
irb(main):015:0> def doIt; puts “done”; end
So Ruby has decided that DoIt is a constant in this context, but it knows that
doIt is a method call. On the other hand, if you supply the (normally
optional) parentheses to DoIt it works as expected:
Maybe if you always use parentheses and stuff you can get away with having
methods that start with an uppercase letter… I just wouldn’t do it because
I don’t want to take chances.
On Mon August 4 2003 5:38 pm, Brett H. Williams wrote:
Yes–copied from the app which prompted the question which is implemented
in C++ with such capitalization. I realize it isn’t the norm, but is there
another reason you say it’s a “bad idea”?