Forum: Ruby Which is the preferred way?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jeffrey B. (Guest)
on 2007-08-02 23:04
(Received via mailing list)
I see that “p” is the same as “puts”.  Which would
most programs use in a program?

Jeff
Alex Y. (Guest)
on 2007-08-02 23:15
(Received via mailing list)
Jeffrey B. wrote:
> I see that “p” is the same as “puts”.  Which would
> most programs use in a program?
It's not the same - p foo is equivalent to puts foo.inspect.  They're
used for different things; p is for debugging output, puts for general
text display.
This topic is locked and can not be replied to.