lib/active_model/attribute_methods.rb in activemodel-6.0.2.2 vs lib/active_model/attribute_methods.rb in activemodel-6.0.3.rc1

- old
+ new

@@ -380,10 +380,11 @@ mod.module_eval <<-RUBY, __FILE__, __LINE__ + 1 #{defn} #{body} end + ruby2_keywords(:'#{name}') if respond_to?(:ruby2_keywords, true) RUBY end class AttributeMethodMatcher #:nodoc: attr_reader :prefix, :suffix, :target @@ -429,9 +430,10 @@ else match = matched_attribute_method(method.to_s) match ? attribute_missing(match, *args, &block) : super end end + ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true) # +attribute_missing+ is like +method_missing+, but for attributes. When # +method_missing+ is called we check to see if there is a matching # attribute method. If so, we tell +attribute_missing+ to dispatch the # attribute. This method can be overloaded to customize the behavior.