summaryrefslogtreecommitdiff
path: root/ext/pathname/lib/pathname.rb
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-25 14:42:36 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-25 14:42:36 +0000
commit6df5f314ac7809e2aedc22a961cf31c4e3f21d42 (patch)
treeb77d23e464ab684fbc4576b4f6cf8bcae4825927 /ext/pathname/lib/pathname.rb
parent602a9c1416e0519f95c502ff13110e5dd08d199d (diff)
remove unnecessary unshift
* ext/pathname/lib/pathname.rb (Pathname#join): remove unnecessary unshift. * test/pathname/test_pathname.rb (TestPathname#test_join): add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pathname/lib/pathname.rb')
-rw-r--r--ext/pathname/lib/pathname.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb
index 20c92e23dc..bbcb5e4e2a 100644
--- a/ext/pathname/lib/pathname.rb
+++ b/ext/pathname/lib/pathname.rb
@@ -384,7 +384,6 @@ class Pathname
# #=> true
#
def join(*args)
- args.unshift self
result = args.pop
result = Pathname.new(result) unless Pathname === result
return result if result.absolute?
@@ -393,7 +392,7 @@ class Pathname
result = arg + result
return result if result.absolute?
}
- result
+ self + result
end
#