1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
ko1 2010-03-09 19:21:37 +00:00
parent bbcb186ae6
commit 9da12c5850
4 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,9 @@
Wed Mar 10 04:17:08 2010 Koichi Sasada <ko1@atdot.net>
* 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.
Tue Mar 9 20:50:09 2010 Yusuke Endoh <mame@tsg.ne.jp>
* test/dl/test_method.rb: delete a residual test for dl on libffi.

View file

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

View file

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

View file

@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
#define RUBY_RELEASE_DATE "2010-03-09"
#define RUBY_RELEASE_DATE "2010-03-10"
#define RUBY_PATCHLEVEL -1
#define RUBY_BRANCH_NAME "trunk"
@ -8,7 +8,7 @@
#define RUBY_VERSION_TEENY 1
#define RUBY_RELEASE_YEAR 2010
#define RUBY_RELEASE_MONTH 3
#define RUBY_RELEASE_DAY 9
#define RUBY_RELEASE_DAY 10
#include "ruby/version.h"