diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-03 06:04:54 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-03 06:04:54 +0000 |
commit | 54fbbb48847b4e98c64bcce37eff2349a594baae (patch) | |
tree | 11360d8fd955bda6de03a055fe10f49984575b2d /lib/set.rb | |
parent | 489bf84b9f95f45e6f1b232403f02939a93d159d (diff) |
Properly back out.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/set.rb')
-rw-r--r-- | lib/set.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/set.rb b/lib/set.rb index 662b698b4e..4cba96e9e2 100644 --- a/lib/set.rb +++ b/lib/set.rb @@ -258,7 +258,9 @@ class Set # Replaces the elements with ones returned by collect(). def collect! block_given? or return enum_for(__method__) - replace(collect) + set = self.class.new + each { |o| set << yield(o) } + replace(set) end alias map! collect! |