diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-13 06:20:06 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-13 06:20:06 +0000 |
commit | dde0e30c2dc98d8356374a1173c7129fbc8e5e14 (patch) | |
tree | d7d451243d0af16ee73dac538b5bb6878f83f115 /test/pathname | |
parent | 5ad8e42bef873c7075d41f21688ebb779537a830 (diff) |
Pathname: Have #relative_path_from accept String argument.
[Fix GH-1975]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/pathname')
-rw-r--r-- | test/pathname/test_pathname.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb index 42bab36bc5..3bea182ed4 100644 --- a/test/pathname/test_pathname.rb +++ b/test/pathname/test_pathname.rb @@ -291,9 +291,10 @@ class TestPathname < Test::Unit::TestCase end def relative_path_from(dest_directory, base_directory) - Pathname.new(dest_directory).relative_path_from(Pathname.new(base_directory)).to_s + Pathname.new(dest_directory).relative_path_from(base_directory).to_s end + defassert(:relative_path_from, "../a", Pathname.new("a"), "b") defassert(:relative_path_from, "../a", "a", "b") defassert(:relative_path_from, "../a", "a", "b/") defassert(:relative_path_from, "../a", "a/", "b") |