Skip to content

Commit

Permalink
Fixes #3175. 9k fail to compile ruby code of using multibyte char on …
Browse files Browse the repository at this point in the history
…Windows
  • Loading branch information
enebo committed Aug 21, 2015
1 parent de4aa81 commit 1778496
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/main/ruby/jruby/jruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def parse(content = nil, filename = (default_filename = true; '-'), extra_positi
content = content.to_str
filename = filename.to_str unless default_filename

runtime.parse(reference0(content).byte_list, filename, nil, lineno, extra_position_info)
runtime.java_send :parse, [org.jruby.util.ByteList, java.lang.String, org.jruby.runtime.DynamicScope, Java::int, Java::boolean], reference0(content).byte_list, filename, nil, lineno, extra_position_info
end
end
alias ast_for parse
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby/stdlib/jruby/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def compile_files_with_options(filenames, options = default_options)
# The compilation code
compile_proc = proc do |filename|
begin
file = File.open(filename)
file = File.open(filename, "r:ASCII-8BIT")

if options[:sha1]
pathname = "ruby.jit.FILE_" + Digest::SHA1.hexdigest(File.read(filename)).upcase
Expand Down

0 comments on commit 1778496

Please sign in to comment.