aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-03-08 23:42:01 -0800
committerAdam Vandenberg2010-03-08 23:42:01 -0800
commit8eefb17e2c54b525956f11bc9674ae4373dc8681 (patch)
tree9bd4df3947a7287b72799b30630fa01e17dfe44a /Library
parent04f1967951d7cad3319617bdeb796e95954d53b8 (diff)
downloadhomebrew-8eefb17e2c54b525956f11bc9674ae4373dc8681.tar.bz2
Change the return value of Pathname.install.
The change to Pathname to support renaming changed the return value. This commit puts it back, so the associated unit test passes again.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 5564423ad..4416e0efe 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -17,8 +17,10 @@ class Pathname
if new_basename
new_basename = File.basename(new_basename) # rationale: see Pathname.+
dst = self+new_basename
+ return_value =Pathname.new(dst)
else
dst = self
+ return_value = self+File.basename(src)
end
src = src.to_s
@@ -41,7 +43,7 @@ class Pathname
FileUtils.mv src, dst
end
- return Pathname.new(dst)
+ return return_value
end
# we assume this pathname object is a file obviously