hi list.
I have the following code:
#! /usr/bin/ruby
class B
def fun_b
p "B"
end
end
class A
b = B.new
end
a = 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 correct.
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