#783: Patch for builder.rb error: invalid byte sequence in US-ASCII -------------------------------+-------------------------------------------- Reporter: slew...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.7 Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- As of MacRuby subversion Revision: 4343, following build instructions per ./README.rdoc fails with error message "invalid byte sequence in US- ASCII". This is a known issue with Ruby 1.9 which can be resolved by adding an argument to IO.open/read. In the case of MacRuby's builder.rb, changing File.read(src) to File.read(src, { :mode => "rb" }) resolves the issue. Patch follows:
{{{ Index: rakelib/builder/builder.rb =================================================================== --- rakelib/builder/builder.rb (revision 4343) +++ rakelib/builder/builder.rb (working copy) @@ -142,7 +142,7 @@ end def locate_headers(cont, src) - txt = File.read(src) + txt = File.read(src, { :mode => "rb" }) txt.scan(/#include\s+\"([^"]+)\"/).flatten.each do |header| p = header_path(header) if p and !cont.include?(p) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/783> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel