@Josh: Just to add to what mbanolas mentioned. I had the same problem in the
first try.

The return value of a method is the last executed statement in the method.
Correct?
In your case, you would have outputted the statement "method1 method has 7
characters" using puts within your method_missing implementation. This is
also be the last statement in the method.

So the method call to my_instance.method1 return the success or failure
value of the puts statement. This value is nil and the puts of your method
call outputs a 'nil' after each line.

So, instead of outputting the statement in the method_missing method using
puts, try passing back the string somehow. ;)

Best Regards,

-- 
Prashanth K S
http://www.prashu.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
ruby-on-rails-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to