ruby-changes:56393
From: Nobuyoshi <ko1@a...>
Date: Tue, 9 Jul 2019 08:39:30 +0900 (JST)
Subject: [ruby-changes:56393] Nobuyoshi Nakada: 2a8be8ec33 (master): Suppress uninitialized instance variable warnings
https://git.ruby-lang.org/ruby.git/commit/?id=2a8be8ec33 From 2a8be8ec33a238410e58864f59b6ffccfd0cc19d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 9 Jul 2019 08:31:27 +0900 Subject: Suppress uninitialized instance variable warnings diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c index e59a120..036205d 100644 --- a/ext/json/generator/generator.c +++ b/ext/json/generator/generator.c @@ -692,7 +692,7 @@ static VALUE cState_aref(VALUE self, VALUE name) https://github.com/ruby/ruby/blob/trunk/ext/json/generator/generator.c#L692 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))); } } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/