aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_array.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 31f33dde1e..8c08acec7c 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -2458,6 +2458,10 @@ class TestArray < Test::Unit::TestCase
assert_raise(TypeError) do
[1, 2, 42, 100, 666].bsearch{ "not ok" }
end
+ c = eval("class C\u{309a 26a1 26c4 1f300};self;end")
+ assert_raise_with_message(TypeError, /C\u{309a 26a1 26c4 1f300}/) do
+ [0,1].bsearch {c.new}
+ end
assert_equal [1, 2, 42, 100, 666].bsearch{}, [1, 2, 42, 100, 666].bsearch{false}
end