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: nick 2013-07-10 18:40

That's a lot of bad things! I am using it to learn rails though, and I am content with it for that.

So why did a 3 come up?

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