1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Suppress uninitialized instance variable warnings

This commit is contained in:
Nobuyoshi Nakada 2019-07-09 08:31:27 +09:00
parent ad38f02645
commit 2a8be8ec33
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -692,7 +692,7 @@ static VALUE cState_aref(VALUE self, VALUE name)
if (RTEST(rb_funcall(self, i_respond_to_p, 1, name))) {
return rb_funcall(self, i_send, 1, name);
} else {
return rb_ivar_get(self, rb_intern_str(rb_str_concat(rb_str_new2("@"), name)));
return rb_attr_get(self, rb_intern_str(rb_str_concat(rb_str_new2("@"), name)));
}
}