* parse.y (new_yield): distinguish "yield 1,2" and "yield [1,2]".

[ruby-dev:20360]

* eval.c (rb_eval): support new_yield() change.

* variable.c (rb_const_get_0): warn for Foo::BAR when BAR is a
  toplevel constant (i.e. a constant defined under Object).
  [ruby-list:36935]

* parse.y (no_blockarg): separate no block argument check and
  ret_args argument processing.

* range.c (rb_range_beg_len): out_of_range check after adjusting
  end point. [ruby-dev:20370]

* parse.y (call_args): the first argument to arg_cancat() should
  be NODE_LIST. [ruby-core:01151]

* eval.c (rb_eval): should dispatch based on ID type.

* eval.c (rb_yield_0): should restore scope_vmode during yield.
  [ruby-dev:20361]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-06-20 07:11:44 +00:00
parent 65ba3eba64
commit f289fddace
10 changed files with 151 additions and 40 deletions

View file

@ -377,13 +377,9 @@ rb_range_beg_len(range, begp, lenp, len, err)
if (end > len)
end = len;
}
if (end < 0) {
end += len;
if (end < 0) {
goto out_of_range;
}
}
if (end < 0) end += len;
if (!EXCL(range)) end++; /* include end point */
if (end < 0) goto out_of_range;
len = end - beg;
if (len < 0) goto out_of_range;