aboutsummaryrefslogtreecommitdiffstats
path: root/range.c
diff options
context:
space:
mode:
Diffstat (limited to 'range.c')
-rw-r--r--range.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/range.c b/range.c
index 394495146b..388418bff7 100644
--- a/range.c
+++ b/range.c
@@ -595,7 +595,9 @@ range_bsearch(VALUE range)
smaller = cmp < 0; \
} \
else { \
- smaller = RTEST(v); \
+ rb_raise(rb_eTypeError, "wrong argument type %s" \
+ "(must respond be numeric, true, false or nil)", \
+ rb_obj_classname(v)); \
} \
} while (0)