@Brian.

Thanks for your reply. That makes it more clear.

This is the output I got from running your script:


C:\Users\Abder-Rahman\Desktop\Research>ruby p_vs_print_vs_puts.rb
here's a stringhere's a string
#<Foo:0x2c25930 @a=123>

Can you just describe this part: #<Foo:0x2c25930 @a=123>

And, when you said: "p(x) is like puts(x.inspect), [[where x converts an 
object]] into a debugging string form, that is, one which shows its 
internal state."

Shouldn't "... where x converts an object...]], be "... where "inspect" 
converts an object..."?

Thanks.

-- 
Posted via http://www.ruby-forum.com/.