aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorHincu Petru <hincupetru@gmail.com>2013-12-19 17:30:01 +0000
committerHincu Petru <hincupetru@gmail.com>2013-12-19 17:30:01 +0000
commit4cb30d9f8b091c9eb1d7bf90c2974b96ea3a59f8 (patch)
tree1238c4ec89bd4e09d0208dbd1ddd4c4675248007 /activesupport/lib/active_support
parentcc1f0b4c2df0fa12ad6f3fd3b496e72e6f428e9c (diff)
downloadrails-4cb30d9f8b091c9eb1d7bf90c2974b96ea3a59f8.tar.gz
rails-4cb30d9f8b091c9eb1d7bf90c2974b96ea3a59f8.tar.bz2
rails-4cb30d9f8b091c9eb1d7bf90c2974b96ea3a59f8.zip
Fixed configurable.rb regular expression name check
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/configurable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/configurable.rb b/activesupport/lib/active_support/configurable.rb
index e0d39d509f..bafcadff9a 100644
--- a/activesupport/lib/active_support/configurable.rb
+++ b/activesupport/lib/active_support/configurable.rb
@@ -107,7 +107,7 @@ module ActiveSupport
options = names.extract_options!
names.each do |name|
- raise NameError.new('invalid config attribute name') unless name =~ /^[_A-Za-z]\w*$/
+ raise NameError.new('invalid config attribute name') unless name =~ /\A[_A-Za-z]\w*\Z/
reader, reader_line = "def #{name}; config.#{name}; end", __LINE__
writer, writer_line = "def #{name}=(value); config.#{name} = value; end", __LINE__