diff --git a/ChangeLog b/ChangeLog index 5b1ae043ce..420fe6b2d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Dec 03 14:14:19 2012 Koichi Sasada + + * compile.c (iseq_compile_each): joke shouldn't use id.h defined ids. + + * id.c (Init_id): ditto. + + * common.mk: fix dpendency. + Mon Dec 3 12:43:35 2012 Nobuyoshi Nakada * misc/ruby-mode.el (ruby-block-end-re, ruby-delimiter) diff --git a/common.mk b/common.mk index d00f7a2723..992c90b1a6 100644 --- a/common.mk +++ b/common.mk @@ -682,8 +682,7 @@ parse.$(OBJEXT): {$(VPATH)}parse.c $(RUBY_H_INCLUDES) {$(VPATH)}node.h \ $(ENCODING_H_INCLUDES) {$(VPATH)}id.h {$(VPATH)}regenc.h \ {$(VPATH)}regex.h {$(VPATH)}util.h {$(VPATH)}lex.c \ {$(VPATH)}defs/keywords {$(VPATH)}id.c {$(VPATH)}parse.y \ - {$(VPATH)}parse.h {$(VPATH)}vm_opts.h \ - {$(VPATH)}internal.h $(PROBES_H_INCLUDES) + {$(VPATH)}parse.h {$(VPATH)}internal.h $(PROBES_H_INCLUDES) proc.$(OBJEXT): {$(VPATH)}proc.c {$(VPATH)}eval_intern.h \ $(RUBY_H_INCLUDES) {$(VPATH)}gc.h $(VM_CORE_H_INCLUDES) \ {$(VPATH)}internal.h {$(VPATH)}iseq.h diff --git a/compile.c b/compile.c index a93a230af5..5412beef7a 100644 --- a/compile.c +++ b/compile.c @@ -4222,11 +4222,17 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) INIT_ANCHOR(args); #if SUPPORT_JOKE if (nd_type(node) == NODE_VCALL) { - if (mid == idBitblt) { + ID id_bitblt; + ID id_answer; + + CONST_ID(id_bitblt, "bitblt"); + CONST_ID(id_answer, "the_answer_to_life_the_universe_and_everything"); + + if (mid == id_bitblt) { ADD_INSN(ret, nd_line(node), bitblt); break; } - else if (mid == idAnswer) { + else if (mid == id_answer) { ADD_INSN(ret, nd_line(node), answer); break; } diff --git a/id.c b/id.c index 0da29dffbe..b6793de3b9 100644 --- a/id.c +++ b/id.c @@ -13,8 +13,6 @@ #include "id.h" -#include "vm_opts.h" /* for SUPPORT_JOKE */ - static void Init_id(void) { @@ -48,10 +46,6 @@ Init_id(void) REGISTER_SYMID(idGets, "gets"); REGISTER_SYMID(idSucc, "succ"); REGISTER_SYMID(idMethodMissing, "method_missing"); -#if SUPPORT_JOKE - REGISTER_SYMID(idBitblt, "bitblt"); - REGISTER_SYMID(idAnswer, "the_answer_to_life_the_universe_and_everything"); -#endif REGISTER_SYMID(idSend, "send"); REGISTER_SYMID(id__send__, "__send__"); REGISTER_SYMID(idInitialize, "initialize");