aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--compile.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ef1b0c082f..b176a866fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,6 @@
-Tue Oct 12 22:18:15 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Oct 12 22:41:07 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * compile.c (iseq_compile_each): fix truncating cast.
* cont.c (fiber_setcontext): missing variable definition.
diff --git a/compile.c b/compile.c
index db4c32fca6..6501565c00 100644
--- a/compile.c
+++ b/compile.c
@@ -3700,7 +3700,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN(ret, nd_line(node), dup);
}
ADD_INSN1(ret, nd_line(node), setglobal,
- (((long)node->nd_entry) | 1));
+ ((VALUE)node->nd_entry | 1));
break;
}
case NODE_IASGN:
@@ -4338,7 +4338,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_GVAR:{
ADD_INSN1(ret, nd_line(node), getglobal,
- (((long)node->nd_entry) | 1));
+ ((VALUE)node->nd_entry | 1));
if (poped) {
ADD_INSN(ret, nd_line(node), pop);
}