summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--vm_insnhelper.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b66bab4c0..79fc15df9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Oct 17 16:23:17 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_getivar): fix to use `aux.index' instead of
+ `aux.opt_pc'.
+
Wed Oct 17 16:03:54 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_call_method_missing): make a refactoring
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 967ec1b4cb..6296748a6e 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -502,7 +502,7 @@ vm_getivar(VALUE obj, ID id, IC ic, rb_call_info_t *ci, int is_attr)
if (LIKELY((!is_attr && (ic->ic_class == klass && ic->ic_vmstat == GET_VM_STATE_VERSION())) ||
(is_attr && ci->aux.index > 0))) {
- long index = !is_attr ? ic->ic_value.index : ci->aux.opt_pc - 1;
+ long index = !is_attr ? ic->ic_value.index : ci->aux.index - 1;
long len = ROBJECT_NUMIV(obj);
VALUE *ptr = ROBJECT_IVPTR(obj);
@@ -527,7 +527,7 @@ vm_getivar(VALUE obj, ID id, IC ic, rb_call_info_t *ci, int is_attr)
ic->ic_vmstat = GET_VM_STATE_VERSION();
}
else { /* call_info */
- ci->aux.opt_pc = index + 1;
+ ci->aux.index = index + 1;
}
}
}