On Mar 5, 2004, at 9:19, Yalin wrote:

> Thanks,
>
> but what is the reason for this problem?
> The same is, e.g. when you use the "inspect" or the "to_s" message of 
> an
> object.

If you want Ruby to output a value, you need to say something like

    puts value

Simply saying

    value

doesn't generate any output.

In the book, we add annotations to some code listing to show the values 
of expressions on those lines. So we might have

    value = 123
    value + 2        # => 125

The reason we did that was that it saved a lot of space, comared with

    value = 123
    puts(value+2)

   generates:

   125


It's also easier to track what values ti in with which expressions.

Sorry it's confusing



Cheers

Dave