1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

remove File#to_path alias

This commit is contained in:
Vasiliy Ermolovich 2011-12-21 22:28:40 +03:00
parent 748725e9ce
commit a7ba8e1fb3
6 changed files with 2 additions and 15 deletions

View file

@ -1,4 +1,3 @@
require 'active_support/core_ext/file/path'
require 'action_controller/metal/exceptions'
module ActionController #:nodoc:
@ -115,7 +114,7 @@ module ActionController #:nodoc:
private
def send_file_headers!(options)
type_provided = options.has_key?(:type)
options.update(DEFAULT_SEND_FILE_OPTIONS.merge(options))
[:type, :disposition].each do |arg|
raise ArgumentError, ":#{arg} option required" if options[arg].nil?

View file

@ -1,4 +1,3 @@
require 'active_support/core_ext/file/path'
require 'rack/chunked'
module ActionController #:nodoc:
@ -195,7 +194,7 @@ module ActionController #:nodoc:
# ==== Passenger
#
# To be described.
#
#
module Streaming
extend ActiveSupport::Concern

View file

@ -1,2 +1 @@
require 'active_support/core_ext/file/atomic'
require 'active_support/core_ext/file/path'

View file

@ -1,5 +0,0 @@
class File
unless File.allocate.respond_to?(:to_path)
alias to_path path
end
end

View file

@ -16,4 +16,3 @@ require 'active_support/core_ext/string/interpolation'
require 'active_support/core_ext/string/encoding'
require 'active_support/core_ext/rexml'
require 'active_support/core_ext/time/conversions'
require 'active_support/core_ext/file/path'

View file

@ -57,10 +57,6 @@ class AtomicWriteTest < Test::Unit::TestCase
File.unlink(file_name) rescue nil
end
def test_responds_to_to_path
assert_equal __FILE__, File.open(__FILE__, "r").to_path
end
private
def file_name
"atomic.file"