* 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/branches/ruby_1_9_1@20095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2008-11-03 04:10:17 +00:00
parent 872858f365
commit 438970f102
2 changed files with 6 additions and 1 deletions

View file

@ -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;
}