From 54b5596a6cfc656123ea84024f09738a1c6300d2 Mon Sep 17 00:00:00 2001 From: amitkumarsuroliya Date: Sat, 19 Sep 2015 02:43:21 +0530 Subject: 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] --- .../lib/active_support/core_ext/module/attribute_accessors.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport') 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 # instance_reader: false or instance_accessor: false. -- cgit v1.2.3