aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-08-25 03:10:38 +0200
committerXavier Noria <fxn@hashref.com>2012-08-25 03:10:38 +0200
commitdfb5898b6dd448a6867dcd26ebcbe0835b26a1e2 (patch)
tree7ab9181439bca212a2bd33fed2d647051c9260fe /activesupport
parent4fbd350dca336e5c5b974b42fb97a1d6da74c366 (diff)
downloadrails-dfb5898b6dd448a6867dcd26ebcbe0835b26a1e2.tar.gz
rails-dfb5898b6dd448a6867dcd26ebcbe0835b26a1e2.tar.bz2
rails-dfb5898b6dd448a6867dcd26ebcbe0835b26a1e2.zip
simplifies yet another regexp
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/dependencies.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 059eb4cd2d..d78af2faa5 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -375,7 +375,7 @@ module ActiveSupport #:nodoc:
# Given +path+, a filesystem path to a ruby file, return an array of constant
# paths which would cause Dependencies to attempt to load this file.
def loadable_constants_for_path(path, bases = autoload_paths)
- path = $1 if path =~ /\A(.*)\.rb\Z/
+ path = $` if path =~ /\.rb\z/
expanded_path = File.expand_path(path)
paths = []