ruby-changes:55697
From: Nobuyoshi <ko1@a...>
Date: Fri, 10 May 2019 15:11:15 +0900 (JST)
Subject: [ruby-changes:55697] Nobuyoshi Nakada: a7b68e63c5 (trunk): Suppress a warning in Psych&YAML with verbose mode
https://git.ruby-lang.org/ruby.git/commit/?id=a7b68e63c5 From a7b68e63c5dd9d366b0ddc17b16650560800f03a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 10 May 2019 12:48:43 +0900 Subject: Suppress a warning in Psych&YAML with verbose mode diff --git a/lib/ostruct.rb b/lib/ostruct.rb index c3b0546..7b232bf 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -206,7 +206,7 @@ class OpenStruct https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb#L206 def respond_to_missing?(mid, include_private = false) # :nodoc: mname = mid.to_s.chomp("=").to_sym - @table&.key?(mname) || super + defined?(@table) && @table.key?(mname) || super end def method_missing(mid, *args) # :nodoc: -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/