From 17b0edde5782c424dbae6020e09a51831e8de7f9 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Sun, 9 Feb 2014 03:07:33 +0200 Subject: Specify what #starts_with? we're talking about. Also added a note what kind of exception we should expect for this internal comment. --- activesupport/lib/active_support/dependencies.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 6be19771f5..b519ef9f71 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -407,7 +407,8 @@ module ActiveSupport #:nodoc: end def load_once_path?(path) - # to_s works around a ruby1.9 issue where #starts_with?(Pathname) will always return false + # to_s works around a ruby1.9 issue where String#starts_with?(Pathname) + # will raise a TypeError: no implicit conversion of Pathname into String autoload_once_paths.any? { |base| path.starts_with? base.to_s } end -- cgit v1.2.3