diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-25 19:06:00 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-25 19:06:00 +0000 |
commit | 62ec26e36fc1d5c729a41bd88a05dae32587e99d (patch) | |
tree | e61a542b6f9d01ba05c553dfc72003b953a03e57 /proc.c | |
parent | b00a501e4312c11c6c98402082fe485731004561 (diff) | |
download | ruby-62ec26e36fc1d5c729a41bd88a05dae32587e99d.tar.gz ruby-62ec26e36fc1d5c729a41bd88a05dae32587e99d.tar.xz ruby-62ec26e36fc1d5c729a41bd88a05dae32587e99d.zip |
* insnhelper.ci (vm_yield_with_cfunc), proc.c: fix Method#to_proc
to return lamba Proc ([ruby-dev:31021], [ruby-dev:31037]).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1313,9 +1313,16 @@ mproc(VALUE method) } static VALUE +mlambda(VALUE method) +{ + return rb_funcall(Qnil, rb_intern("lambda"), 0); +} + +static VALUE bmcall(VALUE args, VALUE method) { volatile VALUE a; + if (CLASS_OF(args) != rb_cArray) { args = rb_ary_new3(1, args); } @@ -1356,7 +1363,7 @@ method_proc(VALUE method) * end * end */ - proc = rb_iterate((VALUE (*)(VALUE))mproc, 0, bmcall, method); + proc = rb_iterate((VALUE (*)(VALUE))mlambda, 0, bmcall, method); return proc; } |