diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-14 01:44:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-14 01:44:37 +0000 |
commit | cb1d290886b9239487bf5d4d9bdfa7005ec0fdd5 (patch) | |
tree | bc249372e5df1256daf5fca090a431f392133f24 /test/ruby/test_lazy_enumerator.rb | |
parent | 8f30190dfecd4b32ca3d82515b8f59e959eed8a3 (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/ruby/test_lazy_enumerator.rb')
-rw-r--r-- | test/ruby/test_lazy_enumerator.rb | 2 |
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 |