Probably you are using twice the instruction 'puts' inside of the method and in the main class before invoking a method. Try to eliminate one of the 'puts' In case you use in the method method_missing: puts "something", the method write something and return nothing -> nil In case you use in the method just "something", then return "something". To understand the differences, try:
A) def myMethod puts "Hello" end puts myMethod output Hello nil B) def myMethod "Hello" end puts myMethod output Hello C) def myMethod puts "Hello" end myMethod output Hello D) def myMethod "Hello" end myMethod output (nothing) Hope it helps! On 9 abr, 16:57, JoshLucas <[email protected]> wrote: > Is anyone getting a "nil" after each line? Here is my output... > > method1 method has 7 characters. > nil > whatever method has 8 characters. > nil > m545 method has 4 characters. > nil > > instead of > > method1 method has 7 characters > whatever method has 8 characters > m545 has 4 characters > > Is this happening to anyone else? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
