diff options
author | Genadi Samokovarov <gsamokovarov@gmail.com> | 2017-05-31 12:16:20 +0300 |
---|---|---|
committer | Genadi Samokovarov <gsamokovarov@gmail.com> | 2017-06-03 13:52:48 +0300 |
commit | b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c (patch) | |
tree | 5d2f9250f66f675280c2761daa52880b28d6a86e /railties/lib | |
parent | a5b0c60714e1e8d8c182af830a26e1c7c884271d (diff) | |
download | rails-b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c.tar.gz rails-b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c.tar.bz2 rails-b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c.zip |
Use mattr_accessor default: option throughout the project
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/info.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails/test_unit/minitest_plugin.rb | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/railties/lib/rails/info.rb b/railties/lib/rails/info.rb index fc064dac32..db08d578c0 100644 --- a/railties/lib/rails/info.rb +++ b/railties/lib/rails/info.rb @@ -5,8 +5,9 @@ module Rails # Rails::InfoController responses. These include the active Rails version, # Ruby version, Rack version, and so on. module Info - mattr_accessor :properties - class << (@@properties = []) + mattr_accessor :properties, default: [] + + class << @@properties def names map(&:first) end diff --git a/railties/lib/rails/test_unit/minitest_plugin.rb b/railties/lib/rails/test_unit/minitest_plugin.rb index 7a852d1109..5d0cf1305f 100644 --- a/railties/lib/rails/test_unit/minitest_plugin.rb +++ b/railties/lib/rails/test_unit/minitest_plugin.rb @@ -134,7 +134,7 @@ module Minitest end end - mattr_reader(:run_via) { RunVia.new } + mattr_reader :run_via, default: RunVia.new end # Put Rails as the first plugin minitest initializes so other plugins |