From d5c6b265b977bc617c2863cf1e27dd0d16beaccc Mon Sep 17 00:00:00 2001 From: yugui Date: Mon, 3 Nov 2008 04:10:17 +0000 Subject: [PATCH] * range.c (rb_range_beg_len): rb_raise takes C values as arguments. [BUG] ranges turned into other value in a message of RangeError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ range.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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; }