aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorAdam Vandenberg2010-03-08 23:42:01 -0800
committerAdam Vandenberg2010-03-08 23:42:01 -0800
commit1e7a71bfef9a1067f49dabd1f16a38c7be94e088 (patch)
tree3ad9de402b9b42798af0104e72e7f464a0f4e40f /Library/Homebrew
parentcb6449c2d932a8913351a93f81ace6d1ee279ef8 (diff)
downloadbrew-1e7a71bfef9a1067f49dabd1f16a38c7be94e088.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/Homebrew')
-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