On 10/7/2010 8:31 AM, Nikita Kuznetsov wrote:
> i would love to have the facepalming moment myself :D
> 
> I just had my facepalm moment... its not "puts", its return!!!
> I use puts on the clientside and return on the serverside and it works 
> great!!!
> 
> FACEPALM

Excellent!  In your original example you were doing exactly that with
your client side in the first two, successful calls to the server.  You
called the server's upper_case and lower_case methods, it returned
strings, and you printed those strings.  I promise that it was agonizing
not being able to tell you what was wrong with your server's help
method. ;-)

Keep in mind that in Ruby an explicit use of the return keyword is not
always necessary.  If the block of code at hand evaluates to the value
you would like to return, you can leave it at that.  Going back to your
original server example, the block for the server's help method could
simply have been { "print some string" }.  You can have an explicit
return statement in there, but it's optional and not often done in Ruby
in these cases.

-Jeremy