summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/array.c b/array.c
index 3f448063ce..e76801df50 100644
--- a/array.c
+++ b/array.c
@@ -2462,7 +2462,9 @@ rb_ary_bsearch(VALUE ary)
}
}
else {
- smaller = RTEST(v);
+ rb_raise(rb_eTypeError, "wrong argument type %s"
+ "(must respond be numeric, true, false or nil)",
+ rb_obj_classname(v));
}
if (smaller) {
high = mid;