diff --git a/ChangeLog b/ChangeLog index 76838aee96..0cdfd93a66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Nov 3 13:00:26 2008 Yuki Sonoda (Yugui) + + * range.c (rb_range_beg_len): rb_raise takes C values as arguments. + [BUG] ranges turned into other value in a message of RangeError. + Mon Nov 3 00:36:44 2008 Masaki Suketa * test/win32ole/test_win32ole_event.rb: rename test class. diff --git a/range.c b/range.c index 5c77e03f73..0e9b390c39 100644 --- a/range.c +++ b/range.c @@ -636,7 +636,7 @@ rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err) out_of_range: if (err) { rb_raise(rb_eRangeError, "%ld..%s%ld out of range", - b, excl ? "." : "", e); + NUM2LONG(b), excl ? "." : "", NUM2LONG(e)); } return Qnil; }