From: Brian Candler Date: 2010-09-10T23:18:06+09:00 Subject: Re: calling private accessors Davy Brion wrote: > def set_the_name(value) > name = value > end To Ruby, that's an assignment to a local variable, which then drops out of scope. That's why you have to do "self.name= value" to call the method. If it really were private, you'd need send(:name=, value) although being private rather negates the purpose of an 'accessor' which is to make values accessible :-) > when calling the private accessor without using self, its > implementation > clearly isn't executed but no exception is raised either... why is that? Because it's perfectly legal to assign a value to a local variable :-) -- Posted via http://www.ruby-forum.com/.