summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 294369504a..caaab54e1d 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -538,6 +538,8 @@ vm_getivar(VALUE obj, ID id, IC ic, rb_call_info_t *ci, int is_attr)
return val;
}
#endif /* USE_IC_FOR_IVAR */
+ if (is_attr)
+ return rb_attr_get(obj, id);
return rb_ivar_get(obj, id);
}