diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-23 15:56:49 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-23 15:56:49 -0700 |
commit | 4001835db00ce44cb75bca33ec02cd76b8ccc790 (patch) | |
tree | e483b87ac5bf63258a40a318f792cd56562fa8c6 /railties | |
parent | 4e5175e9570304a5efd148d11b062f15295bb11d (diff) | |
download | rails-4001835db00ce44cb75bca33ec02cd76b8ccc790.tar.gz rails-4001835db00ce44cb75bca33ec02cd76b8ccc790.tar.bz2 rails-4001835db00ce44cb75bca33ec02cd76b8ccc790.zip |
removing more pathnameisms
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/engine.rb | 6 | ||||
-rw-r--r-- | railties/lib/rails/paths.rb | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index e0950c6929..619c76206d 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -416,9 +416,9 @@ module Rails # Finds engine with given path def find(path) - expanded_path = File.expand_path path.to_s + expanded_path = File.expand_path path Rails::Engine::Railties.engines.find { |engine| - File.expand_path(engine.root.to_s) == expanded_path + File.expand_path(engine.root) == expanded_path } end end @@ -652,7 +652,7 @@ module Rails root = File.exist?("#{root_path}/#{flag}") ? root_path : default raise "Could not find root path for #{self}" unless root - Pathname.new File.realpath root + File.realpath root end def default_middleware_stack diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index b787d91821..6cd9c7bc95 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -1,5 +1,3 @@ -require "pathname" - module Rails module Paths # This object is an extended hash that behaves as root of the <tt>Rails::Paths</tt> system. @@ -186,7 +184,7 @@ module Rails raise "You need to set a path root" unless @root.path map do |p| - Pathname.new(@root.path).join(p) + File.join @root.path, p end end |