Wrong statement in Ruby 1.9 keyword doc on ruby-doc.org

M

Marvin Gülker

Hello,

I've found there's a mistake in the keyword documentation for Ruby 1.9
on ruby-doc.org. For "return" one code example is:

def three
return 3
ensure
puts "Enjoy the 3!"
end

a = 3 # Enjoy the 3! #<=====WRONG
puts a # 3

where the marked line does not show "Enjoy the 3!". I think that line
has to be
a = three
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top