Refactor File.expand_path usage to remove additional File.join

This commit is contained in:
Alex Johnson 2013-11-04 17:27:23 +05:30
parent 84eac5dab8
commit 01ef2c1943
3 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ module AbstractController
class AbstractInvalidHelpers < AbstractHelpers
include ActionController::Helpers
path = File.join(File.expand_path('../../../fixtures', __FILE__), "helpers_missing")
path = File.expand_path('../../../fixtures/helpers_missing', __FILE__)
$:.unshift(path)
self.helpers_path = path
end

View File

@ -1,6 +1,6 @@
#!/usr/bin/env ruby
git_path = File.join(File.expand_path('../../..', __FILE__), '.git')
git_path = File.expand_path('../../../.git', __FILE__)
if File.exist?(git_path)
railties_path = File.expand_path('../../lib', __FILE__)

View File

@ -324,7 +324,7 @@ module Rails
end
def self.default_rc_file
File.join(File.expand_path('~'), '.railsrc')
File.expand_path('~/.railsrc')
end
private