From 9da12c5850a4226b51ba5fd8fd52c45939f7757c Mon Sep 17 00:00:00 2001
From: ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Tue, 9 Mar 2010 19:21:37 +0000
Subject: * compile.c (defined_expr), insns.def (defined): fix to pass a Symbol
   object such as :$foo for the "defined?($foo)" expression   on defined
 instruction.  This patch fixes ISeq#to_a/load.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index 4da49e2425..95414656bc 100644
--- a/insns.def
+++ b/insns.def
@@ -764,7 +764,7 @@ defined
 	klass = vm_get_cbase(GET_ISEQ(), GET_LFP(), GET_DFP());
 	break;
       case DEFINED_GVAR:
-	if (rb_gvar_defined((struct rb_global_entry *)(obj & ~1))) {
+	if (rb_gvar_defined(rb_global_entry(SYM2ID(obj)))) {
 	    expr_type = "global-variable";
 	}
 	break;
-- 
cgit v1.2.3

