From 23f522c877d36589a76cffe2bf2ea3cb783876f8 Mon Sep 17 00:00:00 2001 From: Tomoyuki Sahara Date: Thu, 3 Apr 2014 11:47:26 +0900 Subject: test fails when we don't have Enumerator. --- mrbgems/mruby-array-ext/test/array.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mrbgems/mruby-array-ext/test/array.rb') 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 -- cgit v1.2.3