Revision: 5224 http://trac.macosforge.org/projects/ruby/changeset/5224 Author: lsansonetti@apple.com Date: 2011-02-08 19:21:27 -0800 (Tue, 08 Feb 2011) Log Message: ----------- fix a bug in rubygems when building gems where tarball data was handled as UTF-8 instead of binary Modified Paths: -------------- MacRuby/trunk/lib/rubygems/package/tar_writer.rb Modified: MacRuby/trunk/lib/rubygems/package/tar_writer.rb =================================================================== --- MacRuby/trunk/lib/rubygems/package/tar_writer.rb 2011-02-09 02:29:50 UTC (rev 5223) +++ MacRuby/trunk/lib/rubygems/package/tar_writer.rb 2011-02-09 03:21:27 UTC (rev 5224) @@ -40,6 +40,9 @@ # number of bytes will be more than #limit def write(data) + # XXX MACRUBY mainly because our File.open won't honor 'b'. + data = data.force_encoding('BINARY') + if data.size + @written > @limit raise FileOverflow, "You tried to feed more data than fits in the file." end
participants (1)
-
source_changes@macosforge.org