E
Elias Athanasopoulos
Hello!
Forgive my newbie-ness.
Using ruby 1.8, while trying to create a similar example of
one I found to the book called "The Ruby Way":
class Foo
@@bar = 10
end
Foo.bar = 4
I get:
elathan@velka:~/src/ruby> ruby test.rb
test.rb:7: undefined method `bar=' for Foo:Class (NoMethodError)
Is this behaviour normal?
Enjoy,
Forgive my newbie-ness.
Using ruby 1.8, while trying to create a similar example of
one I found to the book called "The Ruby Way":
class Foo
@@bar = 10
end
Foo.bar = 4
I get:
elathan@velka:~/src/ruby> ruby test.rb
test.rb:7: undefined method `bar=' for Foo:Class (NoMethodError)
Is this behaviour normal?
Enjoy,