class Test class << self attr_accessor :some def set_some puts self.inspect some = \'some_data\' end def get_some puts sel
some = :foo makes ruby think it should create a new local variable with name some. If you want to call some=(), you have to use an explicit reciever - as in self.some = :foo. I once lost a bet on that... :-/
some = :foo
some
some=()
self.some = :foo