From a7ba8e1fb325a20dc5115eeef278ce946d0450c7 Mon Sep 17 00:00:00 2001 From: Vasiliy Ermolovich Date: Wed, 21 Dec 2011 22:28:40 +0300 Subject: remove File#to_path alias --- activesupport/lib/active_support/core_ext/file.rb | 1 - activesupport/lib/active_support/core_ext/file/path.rb | 5 ----- activesupport/lib/active_support/ruby/shim.rb | 1 - activesupport/test/core_ext/file_test.rb | 4 ---- 4 files changed, 11 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/file/path.rb (limited to 'activesupport') diff --git a/activesupport/lib/active_support/core_ext/file.rb b/activesupport/lib/active_support/core_ext/file.rb index a763447566..dc24afbe7f 100644 --- a/activesupport/lib/active_support/core_ext/file.rb +++ b/activesupport/lib/active_support/core_ext/file.rb @@ -1,2 +1 @@ require 'active_support/core_ext/file/atomic' -require 'active_support/core_ext/file/path' diff --git a/activesupport/lib/active_support/core_ext/file/path.rb b/activesupport/lib/active_support/core_ext/file/path.rb deleted file mode 100644 index b5feab80ae..0000000000 --- a/activesupport/lib/active_support/core_ext/file/path.rb +++ /dev/null @@ -1,5 +0,0 @@ -class File - unless File.allocate.respond_to?(:to_path) - alias to_path path - end -end \ No newline at end of file diff --git a/activesupport/lib/active_support/ruby/shim.rb b/activesupport/lib/active_support/ruby/shim.rb index 6e1e375e06..9652eb4028 100644 --- a/activesupport/lib/active_support/ruby/shim.rb +++ b/activesupport/lib/active_support/ruby/shim.rb @@ -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' diff --git a/activesupport/test/core_ext/file_test.rb b/activesupport/test/core_ext/file_test.rb index e1258b872e..26be694176 100644 --- a/activesupport/test/core_ext/file_test.rb +++ b/activesupport/test/core_ext/file_test.rb @@ -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" -- cgit v1.2.3