mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Make an internal block of Generator return nil instead of self.
* lib/generator.rb (Generator#initialize): Make an internal block return nil instead of self. [Bug #7493] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@38145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
14ddf6c9f0
commit
a88dc95df3
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Dec 2 22:05:54 2012 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* lib/generator.rb (Generator#initialize): Make an internal block
|
||||
return nil instead of self. [Bug #7493]
|
||||
|
||||
Tue Oct 16 17:53:44 2012 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_gc): Fix
|
||||
|
|
|
@ -69,7 +69,7 @@ class Generator
|
|||
def initialize(enum = nil, &block)
|
||||
if enum
|
||||
@block = proc { |g|
|
||||
enum.each { |x| g.yield x }
|
||||
enum.each { |x| g.yield x; nil }
|
||||
}
|
||||
else
|
||||
@block = block
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue