summaryrefslogtreecommitdiff
path: root/golf_prelude.rb
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-13 08:03:30 (GMT)
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-13 08:03:30 (GMT)
commitd4b7cc796cfbc8224a387d4e906ce1e3908f4970 (patch)
tree1a611f44450721f2acb72d3120782fe4a5f640b4 /golf_prelude.rb
parent16612b360b376d0cb3f50f966e2e671cf80fdc25 (diff)
* golf_prelude.rb, lib/set.rb (TC_Set#test_each),
test/readline/test_readline_history.rb (Readline#test_each__enumerator), test/ruby/test_array.rb (TestArray#test_collect), test/ruby/test_enumerator.rb (TestEnumerator#test_initialize): Enumerable::Enumerator is now called Enumerator. * lib/rinda/tuplespace.rb (Rinda::TupleBag#initialize): Use enum_for instead of hardcoding Enumerable::Enumerator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'golf_prelude.rb')
-rw-r--r--golf_prelude.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/golf_prelude.rb b/golf_prelude.rb
index a224a5a..15c1832 100644
--- a/golf_prelude.rb
+++ b/golf_prelude.rb
@@ -84,7 +84,7 @@ class String
replace(a.join)
if result.class == Array
Integer===result[0] ? result.pack('c*') : result.join
- elsif result.class == Enumerable::Enumerator
+ elsif result.class == Enumerator
result.map(&:join).to_enum
else
result
@@ -93,7 +93,7 @@ class String
}
end
-class Enumerable::Enumerator
+class Enumerator
alias old_to_s to_s
(Array.instance_methods-instance_methods-[:replace]+[:to_s]).each{|meth|
eval"def #{meth}(*args, &block)