summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-enumerator
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-19 10:43:54 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-19 10:43:54 +0900
commit2bf718faf86001c30032cbff152c154135577a54 (patch)
tree18ff375fbe2416a54edd673bdd30834a3bfccc60 /mrbgems/mruby-enumerator
parentd9107fd157111ef1bdb39304534ec877fd815a83 (diff)
parentfd80d4ecddcc0e652c394db3b3a92a4f12f05adc (diff)
downloadmruby-2bf718faf86001c30032cbff152c154135577a54.tar.gz
mruby-2bf718faf86001c30032cbff152c154135577a54.zip
Merge pull request #1882 from ksss/enum-find_all
Enumerable#find_all return Enumerator if non block given
Diffstat (limited to 'mrbgems/mruby-enumerator')
-rw-r--r--mrbgems/mruby-enumerator/test/enumerator.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/mrbgems/mruby-enumerator/test/enumerator.rb b/mrbgems/mruby-enumerator/test/enumerator.rb
index 45d86685e..c2b4c09ab 100644
--- a/mrbgems/mruby-enumerator/test/enumerator.rb
+++ b/mrbgems/mruby-enumerator/test/enumerator.rb
@@ -452,6 +452,10 @@ assert 'Enumerable#map' do
assert_equal [[1,0],[4,1],[9,4]], c
end
+assert 'Enumerable#find_all' do
+ assert_equal [[3,4]], [[1,2],[3,4],[5,6]].find_all.each{ |i| i[1] == 4 }
+end
+
assert 'Array#each_index' do
a = [1,2,3]
b = a.each_index