G
Groleo Marius
hi list.
I have the following code:
#! /usr/bin/ruby
class B
def fun_b
p "B"
end
end
class A
b =3D B.new
end
a =3D A.new
a.b.fun_b
The part that bugs me is this error:
/test.rb:15: undefined method `b' for #<A:0xb7cafb24> (NoMethodError)
What is the way to code the above ideea, so that the last line would be cor=
rect.
I'm running ruby 1.8.3 (2005-09-21) [i486-linux].
--
Regards, Groleo!
# Use "Reply to All" on mailing lists.
# touch universe
# chmod +x universe
# ./universe
I have the following code:
#! /usr/bin/ruby
class B
def fun_b
p "B"
end
end
class A
b =3D B.new
end
a =3D A.new
a.b.fun_b
The part that bugs me is this error:
/test.rb:15: undefined method `b' for #<A:0xb7cafb24> (NoMethodError)
What is the way to code the above ideea, so that the last line would be cor=
rect.
I'm running ruby 1.8.3 (2005-09-21) [i486-linux].
--
Regards, Groleo!
# Use "Reply to All" on mailing lists.
# touch universe
# chmod +x universe
# ./universe