https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112016-01-29T14:16:28ZRuby Issue Tracking SystemRuby master - Bug #12030: Crash calling Hash#dig when hash contains ActiveRecord objectshttps://redmine.ruby-lang.org/issues/12030?journal_id=567812016-01-29T14:16:28Zakhramov (Artem Khramov)futu.fata@gmail.com
<ul></ul><p>Hi, I was able to reproduce it on a bit minified example. Here it is:</p>
<pre><code>class Foo
def self.respond_to?(*args)
super
end
end
{ foo: Foo }.dig(:foo, :foo)
</code></pre> Ruby master - Bug #12030: Crash calling Hash#dig when hash contains ActiveRecord objectshttps://redmine.ruby-lang.org/issues/12030?journal_id=567922016-01-30T06:18:13Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Applied in changeset r53695.</p>
<hr>
<p>vm_eval.c: fix hook call</p>
<ul>
<li>vm_eval.c (rb_check_funcall_with_hook): also should call the<br>
given hook before returning Qundef when overridden respond_to?<br>
method returned false. <a href="/issues/12030">[ruby-core:73556]</a> [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Crash calling Hash#dig when hash contains ActiveRecord objects (Closed)" href="https://redmine.ruby-lang.org/issues/12030">#12030</a>]</li>
</ul> Ruby master - Bug #12030: Crash calling Hash#dig when hash contains ActiveRecord objectshttps://redmine.ruby-lang.org/issues/12030?journal_id=568022016-01-30T18:03:51Znagachika (Tomoyuki Chikanaga)nagachika00@gmail.com
<ul><li><strong>Backport</strong> changed from <i>2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN</i> to <i>2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED</i></li></ul><p>r53695 should be backported into ruby_2_3 branch.<br>
rb_check_funcall_with_hook() exists in ruby_2_0_0, ruby_2_1, ruby_2_2 branches and they have same potential bug, but rb_check_funcall_with_hook() is never called in these branches.<br>
I fill <code>REQUIRED</code> for all stable branches even though only 2.3 branch has real issue fixed by the change.</p> Ruby master - Bug #12030: Crash calling Hash#dig when hash contains ActiveRecord objectshttps://redmine.ruby-lang.org/issues/12030?journal_id=578192016-03-29T13:30:39Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Backport</strong> changed from <i>2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED</i> to <i>2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONE</i></li></ul><p>ruby_2_3 r54402 merged revision(s) 53695.</p>