diff options
author | amitkumarsuroliya <amitkumarsuroliya@gmail.com> | 2015-09-19 02:43:21 +0530 |
---|---|---|
committer | amitkumarsuroliya <amitkumarsuroliya@gmail.com> | 2015-09-19 02:47:47 +0530 |
commit | 54b5596a6cfc656123ea84024f09738a1c6300d2 (patch) | |
tree | 0fa261348a6d10346e7388025620b33fe91149cc /activesupport | |
parent | 77370f27db8b70f67756e6948a4bd4a102cdbb7a (diff) | |
download | rails-54b5596a6cfc656123ea84024f09738a1c6300d2.tar.gz rails-54b5596a6cfc656123ea84024f09738a1c6300d2.tar.bz2 rails-54b5596a6cfc656123ea84024f09738a1c6300d2.zip |
Correcting `NameError` error message in `mattr_reader` method. Since this commit https://github.com/rails/rails/commit/7dfbd91b0780fbd6a1dd9bfbc176e10894871d2d, `NameError` includes attribute_name also in error message [ci skip]
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/attribute_accessors.rb | 4 |
1 files changed, 2 insertions, 2 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 a77da573fe..a084177b9f 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb @@ -19,9 +19,9 @@ class Module # The attribute name must be a valid method name in Ruby. # # module Foo - # mattr_reader :"1_Badname " + # mattr_reader :"1_Badname" # end - # # => NameError: invalid attribute name + # # => NameError: invalid attribute name: 1_Badname # # If you want to opt out the creation on the instance reader method, pass # <tt>instance_reader: false</tt> or <tt>instance_accessor: false</tt>. |