summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-array-ext/test/array.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-array-ext/test/array.rb')
-rw-r--r--mrbgems/mruby-array-ext/test/array.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/mrbgems/mruby-array-ext/test/array.rb b/mrbgems/mruby-array-ext/test/array.rb
index 66938f5e0..401d30a5e 100644
--- a/mrbgems/mruby-array-ext/test/array.rb
+++ b/mrbgems/mruby-array-ext/test/array.rb
@@ -260,6 +260,11 @@ assert("Array#bsearch") do
assert_equal 4, a.bsearch{ |x| between( 0, x, 4) }
assert_equal 4, a.bsearch{ |x| between( 4, x, 8) }
assert_equal 8, a.bsearch{ |x| between( 5, x, 8) }
+
+ # Invalid block result
+ assert_raise TypeError, 'invalid block result (must be numeric, true, false or nil)' do
+ a.bsearch{ 'I like to watch the world burn' }
+ end
end
assert("Array#delete_if") do