diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-02 02:51:20 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-02 02:51:20 +0000 |
commit | 60d4fc9f68c16099a9d9574ebea599b084a4a237 (patch) | |
tree | 01276763f0b99390f63d4a267114b6ad4e56a428 /test | |
parent | 1170b057e02cefd34b4ff88ee01369c91b16ae2d (diff) | |
download | ruby-60d4fc9f68c16099a9d9574ebea599b084a4a237.tar.gz |
Fix error with empty args.
* ext/pathname/lib/pathname.rb (Pathname#join): Fix error with
empty args. Reported by ko1 via IRC.
* test/pathname/test_pathname.rb (TestPathname#test_join): Add the
test for above case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/pathname/test_pathname.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb index 94bd8d8872..4e88db754d 100644 --- a/test/pathname/test_pathname.rb +++ b/test/pathname/test_pathname.rb @@ -242,6 +242,8 @@ class TestPathname < Test::Unit::TestCase assert_equal(Pathname("/c"), r) r = Pathname("/a").join("/b", "/c") assert_equal(Pathname("/c"), r) + r = Pathname("/foo/var").join() + assert_equal(Pathname("/foo/var"), r) end def test_absolute |