undef_method can take varargs

This commit is contained in:
Akira Matsuda 2020-05-08 23:55:53 +09:00
parent d80c18a391
commit 1edf103b52
1 changed files with 1 additions and 1 deletions

View File

@ -329,7 +329,7 @@ module ActiveModel
# person.name_short? # => NoMethodError
def undefine_attribute_methods
generated_attribute_methods.module_eval do
instance_methods.each { |m| undef_method(m) }
undef_method(*instance_methods)
end
attribute_method_matchers_cache.clear
end