On Jul 2, 2010, at 9:11 AM, Paul Campbell wrote: > >> defining an attribute based on a Ruby keyword (private). > > I'm pretty sure this isn't the case, since there's no "private" method > name. Interestingly, it's very difficult to come up for a name in this > that isn't a potential collision.
I misspoke re "private" vs "public". I'm now on my second cup of coffee so fully qualified to respond. :) I think this test lends credence to my suspicion, though: ruby-1.9.2-head > class Tester ruby-1.9.2-head ?> def self.public ruby-1.9.2-head ?> puts "Hey, I'm not a keyword, I'm a class method!" ruby-1.9.2-head ?> end ruby-1.9.2-head ?> end => nil ruby-1.9.2-head > Tester.instance_eval do ruby-1.9.2-head > public ruby-1.9.2-head ?> def blah ruby-1.9.2-head ?> puts "blah" ruby-1.9.2-head ?> end ruby-1.9.2-head ?> end Hey, I'm not a keyword, I'm a class method! => nil Try renaming your scope and see if the issue persists. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-c...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.