diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-09 19:21:37 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-09 19:21:37 +0000 |
commit | 9da12c5850a4226b51ba5fd8fd52c45939f7757c (patch) | |
tree | 2c3d03bf0202d583d0a15fe77c495046b303bec3 /compile.c | |
parent | bbcb186ae61294024cef43642a9c9ece98d22de6 (diff) | |
download | ruby-9da12c5850a4226b51ba5fd8fd52c45939f7757c.tar.gz |
* 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
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2623,7 +2623,7 @@ defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *ret, case NODE_GVAR: ADD_INSN(ret, nd_line(node), putnil); ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_GVAR), - ((VALUE)node->nd_entry) | 1, needstr); + ID2SYM(node->nd_entry->id), needstr); return 1; case NODE_CVAR: |