aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support/core_ext/pathname.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/pathname.rb b/activesupport/lib/active_support/core_ext/pathname.rb
index 517c3b972b..04862aea45 100644
--- a/activesupport/lib/active_support/core_ext/pathname.rb
+++ b/activesupport/lib/active_support/core_ext/pathname.rb
@@ -1 +1,5 @@
-require 'active_support/core_ext/pathname/clean_within'
+if defined? Pathname
+ require 'active_support/core_ext/pathname/clean_within'
+else
+ autoload :Pathname, 'active_support/core_ext/pathname/clean_within'
+end