diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-12-21 01:39:18 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-12-21 01:39:18 +0900 |
commit | 8034dde023a64b98c6b3edb80a44e4cc23f8979f (patch) | |
tree | 38ad756d57390a272bceb7068c19ad1e25587689 /actionview | |
parent | 3da358ea83b86368021d6f289627d0682d24d30b (diff) | |
download | rails-8034dde023a64b98c6b3edb80a44e4cc23f8979f.tar.gz rails-8034dde023a64b98c6b3edb80a44e4cc23f8979f.tar.bz2 rails-8034dde023a64b98c6b3edb80a44e4cc23f8979f.zip |
Module#{define_method,alias_method,undef_method,remove_method} become public since Ruby 2.5
https://bugs.ruby-lang.org/issues/14133
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/lookup_context.rb | 2 | ||||
-rw-r--r-- | actionview/lib/action_view/template/handlers/erb.rb | 4 |
2 files changed, 3 insertions, 3 deletions
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", |