diff --git a/lib/rake/ext/pathname.rb b/lib/rake/ext/pathname.rb deleted file mode 100644 index 30130cd1a..000000000 --- a/lib/rake/ext/pathname.rb +++ /dev/null @@ -1,25 +0,0 @@ -require "rake/ext/core" -require "pathname" - -class Pathname - - rake_extension("ext") do - # Return a new Pathname with String#ext applied to it. - # - # This Pathname extension comes from Rake - def ext(newext="") - Pathname.new(Rake.from_pathname(self).ext(newext)) - end - end - - rake_extension("pathmap") do - # Apply the pathmap spec to the Pathname, returning a - # new Pathname with the modified paths. (See String#pathmap for - # details.) - # - # This Pathname extension comes from Rake - def pathmap(spec=nil, &block) - Pathname.new(Rake.from_pathname(self).pathmap(spec, &block)) - end - end -end diff --git a/test/test_rake_pathname_extensions.rb b/test/test_rake_pathname_extensions.rb deleted file mode 100644 index c0d8410d6..000000000 --- a/test/test_rake_pathname_extensions.rb +++ /dev/null @@ -1,15 +0,0 @@ -require File.expand_path("../helper", __FILE__) -require "rake/ext/pathname" - -class TestRakePathnameExtensions < Rake::TestCase - def test_ext_works_on_pathnames - pathname = Pathname.new("abc.foo") - assert_equal Pathname.new("abc.bar"), pathname.ext("bar") - end - - def test_path_map_works_on_pathnames - pathname = Pathname.new("this/is/a/dir/abc.rb") - assert_equal Pathname.new("abc.rb"), pathname.pathmap("%f") - assert_equal Pathname.new("this/is/a/dir"), pathname.pathmap("%d") - end -end