* 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:
ko1 2012-06-04 07:24:44 +00:00
parent 82aa43407c
commit 06513cc1cf
5 changed files with 16 additions and 8 deletions

3
eval.c
View file

@ -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 {