mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (rb_yield_0): avoid core dump. [ruby-dev:28840]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
90952d32f8
commit
8ae45d642f
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Jun 27 10:46:53 2006 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* eval.c (rb_yield_0): avoid core dump. [ruby-dev:28840]
|
||||
|
||||
Mon Jun 26 11:03:00 2006 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rdoc/ri: Add options to limit the ri search path.
|
||||
|
|
5
eval.c
5
eval.c
|
@ -4740,7 +4740,10 @@ rb_yield_0(VALUE val, VALUE self, VALUE klass /* OK */, int flags)
|
|||
}
|
||||
else {
|
||||
if (pcall) {
|
||||
val = RARRAY(val)->ptr[0];
|
||||
if (RARRAY(val)->len == 0)
|
||||
val = Qnil;
|
||||
else
|
||||
val = RARRAY(val)->ptr[0];
|
||||
}
|
||||
assign(self, var, val, pcall);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue