Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Ruby puts function confusing me.

Name: nick 2013-07-10 18:32

Can someone help me with ruby?

I am following a guide to learn rails here, with no prior ruby knowledge. I am relatively knowledgeable in python, and I know django pretty well.

Something that is very confusing to me is if I type in the rails console this code snippit.

>3.times { puts "Betelgeuse!" }

the output is this.

"Betelgeuse!"
"Betelgeuse!"
"Betelgeuse!"
=> 3

In all other instances of using the puts function, that last line has been '=> nil'. Why is this now changing?

Thank you in advance.

Name: Anonymous 2013-07-10 18:54

rereading his post and the explanation has made a lot of sense alongside your comment. Why do you think Ruby/rails is used so much if it has so many glaring problems?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List