mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* vm_insnhelper.h: remove magical code "lfp[0] & 0x02".
Current VM doesn't use this bit. * vm_core.h (RUBY_VM_GET_BLOCK_PTR): added. * eval.c (rb_block_given_p): use RUBY_VM_GET_BLOCK_PTR(). * vm_eval.c (rb_f_block_given_p): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
82aa43407c
commit
06513cc1cf
5 changed files with 16 additions and 8 deletions
3
eval.c
3
eval.c
|
@ -604,8 +604,7 @@ rb_block_given_p(void)
|
|||
{
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
|
||||
if ((th->cfp->lfp[0] & 0x02) == 0 &&
|
||||
GC_GUARDED_PTR_REF(th->cfp->lfp[0])) {
|
||||
if (RUBY_VM_GET_BLOCK_PTR(th->cfp)) {
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue