diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-18 03:09:54 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-18 03:09:54 +0000 |
commit | 78dc3da299f49eec2783190ad72812852750f40e (patch) | |
tree | 61337a349ba6dc71369b3ef0baa3f292b9ae1d37 /test/pathname/test_pathname.rb | |
parent | 623c6d972a5365f469d4ceb0fc3326faf35ba7b6 (diff) | |
download | ruby-78dc3da299f49eec2783190ad72812852750f40e.tar.gz |
Pathname#relative_path_from uses is_a?
I reconsidered because simpler code would have better maintainablity.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/pathname/test_pathname.rb')
-rw-r--r-- | test/pathname/test_pathname.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb index fbf4bb3459..f8e4937802 100644 --- a/test/pathname/test_pathname.rb +++ b/test/pathname/test_pathname.rb @@ -1439,6 +1439,7 @@ class TestPathname < Test::Unit::TestCase Pathname.new("/foo/bar").relative_path_from("/foo/baz")) obj = Object.new def obj.cleanpath() Pathname.new("/foo/baz") end + def obj.is_a?(m) m == Pathname end assert_equal( Pathname.new("../bar"), Pathname.new("/foo/bar").relative_path_from(obj)) |