RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Ruby's p vs puts Method

The puts method in ruby is very popular all over the internet it’s generally used by ruby programmers for debugging purposes and to output the value of certain variables so we can see what’s goin on in our system. However puts can sometimes lead you astray because of how it converts everything into a string. See how p is different from puts

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in