diff options
| author | Tomoyuki Sahara <[email protected]> | 2014-04-03 11:47:26 +0900 |
|---|---|---|
| committer | Tomoyuki Sahara <[email protected]> | 2014-04-03 11:47:26 +0900 |
| commit | 23f522c877d36589a76cffe2bf2ea3cb783876f8 (patch) | |
| tree | 8324fbe046ad2d2091118d4088d6a78841060d70 /mrbgems/mruby-array-ext/test/array.rb | |
| parent | 91805fb0a56748c39fd415607f26df55e4b03bae (diff) | |
| download | mruby-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.rb | 7 |
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 |
