From 8034dde023a64b98c6b3edb80a44e4cc23f8979f Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 21 Dec 2018 01:39:18 +0900 Subject: Module#{define_method,alias_method,undef_method,remove_method} become public since Ruby 2.5 https://bugs.ruby-lang.org/issues/14133 --- activemodel/lib/active_model/attribute_methods.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activemodel/lib') diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index d8352343e9..5c4670f393 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -507,8 +507,8 @@ module ActiveModel temp_method_name = "__temp__#{safe_name}#{'=' if writer}" attr_name_expr = "::ActiveModel::AttributeMethods::AttrNames::#{const_name}" yield temp_method_name, attr_name_expr - mod.send(:alias_method, method_name, temp_method_name) - mod.send(:undef_method, temp_method_name) + mod.alias_method method_name, temp_method_name + mod.undef_method temp_method_name end end end -- cgit v1.2.3