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

**URL:** <https://www.ruby-forum.com/t/wrong-statement-in-ruby-1-9-keyword-doc-on-ruby-doc-org/177749>\
**Category:** Ruby\
**Created:** [October 23, 2009, 12:02am UTC](https://www.ruby-forum.com/t/wrong-statement-in-ruby-1-9-keyword-doc-on-ruby-doc-org/177749 "2009-10-23T00:02:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![quintus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/49beb7/32.png) [@quintus](https://www.ruby-forum.com/u/quintus)\
**Post date:** [October 23, 2009, 12:02am UTC](https://www.ruby-forum.com/t/wrong-statement-in-ruby-1-9-keyword-doc-on-ruby-doc-org/177749/1 "2009-10-23T00:02:08Z")

</div>

Hello,

I’ve found there’s a mistake in the keyword documentation for Ruby 1.9  
on [ruby-doc.org](http://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  
.

Btw., you can pass an argument to the “next” keyword:

irb(main):001:0\> ary = [1, 2, 3]  
=\> [1, 2, 3]  
irb(main):002:0\> ary1 = ary.map{|x| next;x + 1}  
=\> [nil, nil, nil]  
irb(main):003:0\> ary2 = ary.map{|x| next(95);x + 1}  
=\> [95, 95, 95]  
irb(main):004:0\>

Marvin

---

<div class="post-metadata">

**Author:** ![quintus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/49beb7/32.png) [@quintus](https://www.ruby-forum.com/u/quintus)\
**Post date:** [October 23, 2009, 12:09am UTC](https://www.ruby-forum.com/t/wrong-statement-in-ruby-1-9-keyword-doc-on-ruby-doc-org/177749/2 "2009-10-23T00:09:32Z")

</div>

Hi –

On Fri, 23 Oct 2009, Marvin GÃ¼lker wrote:

> 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  
> .

Ha! I love that one. Earth to me. I’ll fix it and forward to James.

> Btw., you can pass an argument to the “next” keyword:
> 
> irb(main):001:0\> ary = [1, 2, 3]  
> =\> [1, 2, 3]  
> irb(main):002:0\> ary1 = ary.map{|x| next;x + 1}  
> =\> [nil, nil, nil]  
> irb(main):003:0\> ary2 = ary.map{|x| next(95);x + 1}  
> =\> [95, 95, 95]  
> irb(main):004:0\>

Good point. I’ll add that too.

David

–  
The Ruby training with D. Black, G. Brown, J.McAnally  
Compleat Jan 22-23, 2010, Tampa, FL  
Rubyist [http://www.thecompleatrubyist.com](http://www.thecompleatrubyist.com)

David A. Black/Ruby Power and Light, LLC ([http://www.rubypal.com](http://www.rubypal.com))
