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 --- actionview/lib/action_view/lookup_context.rb | 2 +- actionview/lib/action_view/template/handlers/erb.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'actionview') diff --git a/actionview/lib/action_view/lookup_context.rb b/actionview/lib/action_view/lookup_context.rb index af67ffa12d..554d223c0e 100644 --- a/actionview/lib/action_view/lookup_context.rb +++ b/actionview/lib/action_view/lookup_context.rb @@ -24,7 +24,7 @@ module ActionView registered_details << name Accessors::DEFAULT_PROCS[name] = block - Accessors.send :define_method, :"default_#{name}", &block + Accessors.define_method(:"default_#{name}", &block) Accessors.module_eval <<-METHOD, __FILE__, __LINE__ + 1 def #{name} @details.fetch(:#{name}, []) diff --git a/actionview/lib/action_view/template/handlers/erb.rb b/actionview/lib/action_view/template/handlers/erb.rb index 270be0a380..7d1a6767d7 100644 --- a/actionview/lib/action_view/template/handlers/erb.rb +++ b/actionview/lib/action_view/template/handlers/erb.rb @@ -17,8 +17,8 @@ module ActionView class_attribute :escape_ignore_list, default: ["text/plain"] [self, singleton_class].each do |base| - base.send(:alias_method, :escape_whitelist, :escape_ignore_list) - base.send(:alias_method, :escape_whitelist=, :escape_ignore_list=) + base.alias_method :escape_whitelist, :escape_ignore_list + base.alias_method :escape_whitelist=, :escape_ignore_list= base.deprecate( escape_whitelist: "use #escape_ignore_list instead", -- cgit v1.2.3