diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-08-07 10:50:40 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-08-07 10:50:40 -0300 |
commit | d96a1b62d7c957fcf4ab818ff06e6d5bfc6f3b2d (patch) | |
tree | beb481e05e5772d2a188938ca535d0dcd2beb534 /activesupport/lib | |
parent | 4b91db5b125dd7bd735e7f42eb8e2c14c0e6757e (diff) | |
parent | a51dad1c525c674ba9e08697332f86790e3570ca (diff) | |
download | rails-d96a1b62d7c957fcf4ab818ff06e6d5bfc6f3b2d.tar.gz rails-d96a1b62d7c957fcf4ab818ff06e6d5bfc6f3b2d.tar.bz2 rails-d96a1b62d7c957fcf4ab818ff06e6d5bfc6f3b2d.zip |
Merge pull request #21158 from lsylvester/only-invoke-mattr_accessor-default-block-once
Prevent the default block for mattr_accessor being called multiple times
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/attribute_accessors.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb index d4e6b5a1ac..a77da573fe 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb @@ -206,7 +206,7 @@ class Module # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] def mattr_accessor(*syms, &blk) mattr_reader(*syms, &blk) - mattr_writer(*syms, &blk) + mattr_writer(*syms) end alias :cattr_accessor :mattr_accessor end |