mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
35247a52ef
commit
32e799db48
45 changed files with 3118 additions and 2650 deletions
6
range.c
6
range.c
|
@ -191,7 +191,11 @@ rb_range_beg_len(range, begp, lenp, len, err)
|
|||
beg += len;
|
||||
if (beg < 0) goto out_of_range;
|
||||
}
|
||||
if (err == 2 && beg > len) goto out_of_range;
|
||||
if (err == 2) {
|
||||
if (beg > len) goto out_of_range;
|
||||
if (end > len || (!EXCL(range) && end == len))
|
||||
goto out_of_range;
|
||||
}
|
||||
if (end < 0) {
|
||||
end += len;
|
||||
if (end < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue