1
0
Fork 0
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:
Marc-Andre Lafortune 2020-09-30 18:21:27 -04:00 committed by Hiroshi SHIBATA
parent 2afbe7113a
commit 37b445eaeb

View file

@ -220,7 +220,7 @@ class OpenStruct
private def is_method_protected!(name) # :nodoc:
if !respond_to?(name, true)
false
elsif name.end_with?('!')
elsif name.match?(/!$/)
true
else
owner = method!(name).owner