mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Convert path to string before call length
Because eager load paths support to using `Pathname`, and `Pathname`
doesn't have `length` method.
Ref: https://travis-ci.org/rails/rails/jobs/485088071#L5140-L5143
Follow up aadeed1518
.
This commit is contained in:
parent
aadeed1518
commit
1d26c86b86
1 changed files with 1 additions and 1 deletions
|
@ -474,7 +474,7 @@ module Rails
|
||||||
def eager_load!
|
def eager_load!
|
||||||
config.eager_load_paths.each do |load_path|
|
config.eager_load_paths.each do |load_path|
|
||||||
# Starts after load_path plus a slash, ends before ".rb".
|
# Starts after load_path plus a slash, ends before ".rb".
|
||||||
relname_range = (load_path.length + 1)...-3
|
relname_range = (load_path.to_s.length + 1)...-3
|
||||||
Dir.glob("#{load_path}/**/*.rb").sort.each do |file|
|
Dir.glob("#{load_path}/**/*.rb").sort.each do |file|
|
||||||
require_dependency file[relname_range]
|
require_dependency file[relname_range]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue