mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* enum.c (each_with_index_i): typo.
* eval.c (rb_yield_splat): should call svalue_to_avalue() before calling rb_yield_0(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
47773e62a6
commit
fc63eb3a77
3 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
Sat Aug 23 02:32:33 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* enum.c (each_with_index_i): typo.
|
||||
|
||||
* eval.c (rb_yield_splat): should call svalue_to_avalue() before
|
||||
calling rb_yield_0().
|
||||
|
||||
Fri Aug 22 17:07:05 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* enum.c (inject_i): use rb_yield_values.
|
||||
|
|
2
enum.c
2
enum.c
|
@ -499,7 +499,7 @@ each_with_index_i(val, memo)
|
|||
VALUE val;
|
||||
NODE *memo;
|
||||
{
|
||||
rb_yield_values(val, INT2FIX(memo->u3.cnt));
|
||||
rb_yield_values(2, val, INT2FIX(memo->u3.cnt));
|
||||
memo->u3.cnt++;
|
||||
return Qnil;
|
||||
}
|
||||
|
|
1
eval.c
1
eval.c
|
@ -4254,6 +4254,7 @@ VALUE
|
|||
rb_yield_splat(values)
|
||||
VALUE values;
|
||||
{
|
||||
values = svalue_to_avalue(values);
|
||||
if (RARRAY(values)->len == 0) {
|
||||
return rb_yield_0(Qundef, 0, 0, Qfalse, Qfalse);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue