diff --git a/error.c b/error.c index be53e8d55244285a6b2d71985f61d37945a9959e..6a9aa2f2c368ddf6ec0c24af0f95ed7c078251bf 100644 --- a/error.c +++ b/error.c @@ -2636,7 +2636,7 @@ exception_loader(VALUE exc, VALUE obj) rb_ivar_foreach(obj, ivar_copy_i, exc); - if (rb_ivar_get(exc, id_bt) == rb_ivar_get(exc, id_bt_locations)) { + if (rb_attr_get(exc, id_bt) == rb_attr_get(exc, id_bt_locations)) { rb_ivar_set(exc, id_bt_locations, Qnil); }