summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-04-03 12:29:24 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-04-03 12:29:24 +0900
commit09d1c423083d5eba552dbc0e6db7eb606542dc93 (patch)
tree318877886f1f643018c5e901c369319025cf413c
parent83a1e7122b5cb8fc22ddcef91241daabf98b1261 (diff)
parent23f522c877d36589a76cffe2bf2ea3cb783876f8 (diff)
downloadmruby-09d1c423083d5eba552dbc0e6db7eb606542dc93.tar.gz
mruby-09d1c423083d5eba552dbc0e6db7eb606542dc93.zip
Merge pull request #1993 from iij/pr-array-should-not-depend-on-enumerator
test fails when we don't have Enumerator.
-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