summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-14 01:44:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-14 01:44:37 +0000
commitcb1d290886b9239487bf5d4d9bdfa7005ec0fdd5 (patch)
treebc249372e5df1256daf5fca090a431f392133f24 /test
parent8f30190dfecd4b32ca3d82515b8f59e959eed8a3 (diff)
* enumerator.c (lazy_grep_func): should use === instead of =~, as
well as Enumerable#grep git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_lazy_enumerator.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_lazy_enumerator.rb b/test/ruby/test_lazy_enumerator.rb
index caf222c235..9e50cd3a69 100644
--- a/test/ruby/test_lazy_enumerator.rb
+++ b/test/ruby/test_lazy_enumerator.rb
@@ -118,6 +118,8 @@ class TestLazyEnumerator < Test::Unit::TestCase
assert_equal('f', a.current)
assert_equal('c', a.lazy.grep(/c/).first)
assert_equal('c', a.current)
+ assert_equal(%w[a e], a.grep(proc {|x| /[aeiou]/ =~ x}))
+ assert_equal(%w[a e], a.lazy.grep(proc {|x| /[aeiou]/ =~ x}).to_a)
end
def test_zip