From a7b68e63c5dd9d366b0ddc17b16650560800f03a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 10 May 2019 12:48:43 +0900 Subject: [PATCH] Suppress a warning in Psych&YAML with verbose mode --- lib/ostruct.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ostruct.rb b/lib/ostruct.rb index c3b0546d5f7f93..7b232bf5a9457c 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -206,7 +206,7 @@ def freeze 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: