summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-array-ext/test/array.rb
diff options
context:
space:
mode:
authorTomoyuki Sahara <[email protected]>2014-04-03 11:47:26 +0900
committerTomoyuki Sahara <[email protected]>2014-04-03 11:47:26 +0900
commit23f522c877d36589a76cffe2bf2ea3cb783876f8 (patch)
tree8324fbe046ad2d2091118d4088d6a78841060d70 /mrbgems/mruby-array-ext/test/array.rb
parent91805fb0a56748c39fd415607f26df55e4b03bae (diff)
downloadmruby-23f522c877d36589a76cffe2bf2ea3cb783876f8.tar.gz
mruby-23f522c877d36589a76cffe2bf2ea3cb783876f8.zip
test fails when we don't have Enumerator.
Diffstat (limited to 'mrbgems/mruby-array-ext/test/array.rb')
-rw-r--r--mrbgems/mruby-array-ext/test/array.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/mrbgems/mruby-array-ext/test/array.rb b/mrbgems/mruby-array-ext/test/array.rb
index ed1edb5c2..8c6a7bd54 100644
--- a/mrbgems/mruby-array-ext/test/array.rb
+++ b/mrbgems/mruby-array-ext/test/array.rb
@@ -139,5 +139,10 @@ assert("Array#reverse_each") do
b << i
end
assert_equal [ "d", "c", "b", "a" ], b
- assert_equal [ "d", "c", "b", "a" ], a.reverse_each.to_a
+
+ if Object.const_defined?(:Enumerator)
+ assert_equal [ "d", "c", "b", "a" ], a.reverse_each.to_a
+ else
+ true
+ end
end