[MacRuby-devel] [MacRuby] #783: Patch for builder.rb error: invalid byte sequence in US-ASCII
MacRuby
ruby-noreply at macosforge.org
Sat Jul 10 04:33:32 PDT 2010
#783: Patch for builder.rb error: invalid byte sequence in US-ASCII
-------------------------------+--------------------------------------------
Reporter: slewsys@… | Owner: lsansonetti@…
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/>
More information about the MacRuby-devel
mailing list