Skip to content
This repository
Browse code

remove File#to_path alias

  • Loading branch information...
commit a7ba8e1fb325a20dc5115eeef278ce946d0450c7 1 parent 748725e
Vasiliy Ermolovich nashby authored
3  actionpack/lib/action_controller/metal/data_streaming.rb
... ... @@ -1,4 +1,3 @@
1   -require 'active_support/core_ext/file/path'
2 1 require 'action_controller/metal/exceptions'
3 2
4 3 module ActionController #:nodoc:
@@ -115,7 +114,7 @@ def send_data(data, options = {}) #:doc:
115 114 private
116 115 def send_file_headers!(options)
117 116 type_provided = options.has_key?(:type)
118   -
  117 +
119 118 options.update(DEFAULT_SEND_FILE_OPTIONS.merge(options))
120 119 [:type, :disposition].each do |arg|
121 120 raise ArgumentError, ":#{arg} option required" if options[arg].nil?
3  actionpack/lib/action_controller/metal/streaming.rb
... ... @@ -1,4 +1,3 @@
1   -require 'active_support/core_ext/file/path'
2 1 require 'rack/chunked'
3 2
4 3 module ActionController #:nodoc:
@@ -195,7 +194,7 @@ module ActionController #:nodoc:
195 194 # ==== Passenger
196 195 #
197 196 # To be described.
198   - #
  197 + #
199 198 module Streaming
200 199 extend ActiveSupport::Concern
201 200
1  activesupport/lib/active_support/core_ext/file.rb
... ... @@ -1,2 +1 @@
1 1 require 'active_support/core_ext/file/atomic'
2   -require 'active_support/core_ext/file/path'
5 activesupport/lib/active_support/core_ext/file/path.rb
... ... @@ -1,5 +0,0 @@
1   -class File
2   - unless File.allocate.respond_to?(:to_path)
3   - alias to_path path
4   - end
5   -end
1  activesupport/lib/active_support/ruby/shim.rb
@@ -16,4 +16,3 @@
16 16 require 'active_support/core_ext/string/encoding'
17 17 require 'active_support/core_ext/rexml'
18 18 require 'active_support/core_ext/time/conversions'
19   -require 'active_support/core_ext/file/path'
4 activesupport/test/core_ext/file_test.rb
@@ -57,10 +57,6 @@ def test_atomic_write_preserves_default_file_permissions
57 57 File.unlink(file_name) rescue nil
58 58 end
59 59
60   - def test_responds_to_to_path
61   - assert_equal __FILE__, File.open(__FILE__, "r").to_path
62   - end
63   -
64 60 private
65 61 def file_name
66 62 "atomic.file"

0 comments on commit a7ba8e1

Please sign in to comment.
Something went wrong with that request. Please try again.