mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* 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:
parent
872858f365
commit
438970f102
2 changed files with 6 additions and 1 deletions
2
range.c
2
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue