diff options
| author | Andrew Janke | 2016-04-22 16:54:09 -0400 | 
|---|---|---|
| committer | Andrew Janke | 2016-04-22 21:49:00 -0400 | 
| commit | 258a764f678b0d0d1c5bc0dee4a31d6ad79a8471 (patch) | |
| tree | 0af196427f927865bcc586dcbce8ae70929b7b4c /Library/Homebrew/extend/fileutils.rb | |
| parent | 2921795668970f9b5598037fc55940d29ba941d6 (diff) | |
| download | brew-258a764f678b0d0d1c5bc0dee4a31d6ad79a8471.tar.bz2 | |
stage: fix block signature back-compatibility under Ruby 1.8.7
The new stage() signature introduced by #66 breaks back-compatibility
under Ruby 1.8.7. This fixes it by switching back to a one-argument
block signature and using a new class to wrap both the Resource and
Mktemp info for the staging context, in a signature-back-compatible
way.
Addresses homebrew/homebrew-core#529.
Closes #135.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
Diffstat (limited to 'Library/Homebrew/extend/fileutils.rb')
| -rw-r--r-- | Library/Homebrew/extend/fileutils.rb | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb index af17d4eff..188b0ccbf 100644 --- a/Library/Homebrew/extend/fileutils.rb +++ b/Library/Homebrew/extend/fileutils.rb @@ -179,7 +179,7 @@ end  unless File.respond_to?(:write)    class File      def self.write(filename, contents) -      File.open(filename, 'w') do |file| +      File.open(filename, "w") do |file|          file.write contents        end      end | 
