mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/ostruct] Compatibility with Ruby 2.5
https://github.com/ruby/ostruct/commit/ecd9fafdf8
This commit is contained in:
parent
2afbe7113a
commit
37b445eaeb
1 changed files with 1 additions and 1 deletions
|
@ -220,7 +220,7 @@ class OpenStruct
|
||||||
private def is_method_protected!(name) # :nodoc:
|
private def is_method_protected!(name) # :nodoc:
|
||||||
if !respond_to?(name, true)
|
if !respond_to?(name, true)
|
||||||
false
|
false
|
||||||
elsif name.end_with?('!')
|
elsif name.match?(/!$/)
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
owner = method!(name).owner
|
owner = method!(name).owner
|
||||||
|
|
Loading…
Add table
Reference in a new issue