1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (rb_yield_0): need argument adjustment for C defined

blocks too.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2001-05-24 05:26:21 +00:00
parent fb7c6c152b
commit 610e04df24
3 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Thu May 24 14:23:35 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_yield_0): need argument adjustment for C defined
blocks too.
Tue May 22 17:10:35 2001 K.Kosako <kosako@sofnec.co.jp>
* variable.c (rb_alias_variable): should not allow variable

7
eval.c
View file

@ -3559,6 +3559,13 @@ rb_yield_0(val, self, klass, acheck)
POP_TAG();
if (state) goto pop_state;
}
else {
/* argument adjust for proc_call etc. */
if (acheck && val != Qundef &&
TYPE(val) == T_ARRAY && RARRAY(val)->len == 1) {
val = RARRAY(val)->ptr[0];
}
}
PUSH_ITER(block->iter);
PUSH_TAG(PROT_NONE);

View file

@ -1,4 +1,4 @@
#define RUBY_VERSION "1.6.4"
#define RUBY_RELEASE_DATE "2001-05-22"
#define RUBY_RELEASE_DATE "2001-05-24"
#define RUBY_VERSION_CODE 164
#define RUBY_RELEASE_CODE 20010522
#define RUBY_RELEASE_CODE 20010524