mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
instead of returning $& if =~ succeeds, use String#[]
This commit is contained in:
parent
148e33058c
commit
4fbd350dca
1 changed files with 1 additions and 1 deletions
|
@ -443,7 +443,7 @@ module ActiveSupport #:nodoc:
|
|||
def load_file(path, const_paths = loadable_constants_for_path(path))
|
||||
log_call path, const_paths
|
||||
const_paths = [const_paths].compact unless const_paths.is_a? Array
|
||||
parent_paths = const_paths.collect { |const_path| /.*(?=::)/ =~ const_path ? $& : :Object }
|
||||
parent_paths = const_paths.collect { |const_path| const_path[/.*(?=::)/] || :Object }
|
||||
|
||||
result = nil
|
||||
newly_defined_paths = new_constants_in(*parent_paths) do
|
||||
|
|
Loading…
Reference in a new issue