From 1d26c86b8611bb37f5641d4f3e3e94d8675eba1d Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Mon, 28 Jan 2019 08:00:11 +0900 Subject: 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 aadeed1518b9092ea21adf49c728172368129f0e. --- railties/lib/rails/engine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 6695507d93..d6c329b581 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -474,7 +474,7 @@ module Rails def eager_load! config.eager_load_paths.each do |load_path| # 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| require_dependency file[relname_range] end -- cgit v1.2.3