Browse files

simplifies yet another regexp

  • Loading branch information...
1 parent 4fbd350 commit dfb5898b6dd448a6867dcd26ebcbe0835b26a1e2 @fxn fxn committed Aug 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/dependencies.rb
View
2 activesupport/lib/active_support/dependencies.rb
@@ -375,7 +375,7 @@ def qualified_const_defined?(path)
# 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 = []

0 comments on commit dfb5898

Please sign in to comment.