Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ccc74ba7d9e2
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 83747b990dc7
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on Feb 23, 2016

  1. Also include special encodings during lookup from parse_mode_enc.

    Silences warnings:
    
    ```
    [3491/8002] TestIO_M17N#test_cr_decorator_on_stdout-:1: warning: Unsupported encoding locale ignored
    [3492/8002] TestIO_M17N#test_crlf_decorator_on_stdout-:1: warning: Unsupported encoding locale ignored
    [3511/8002] TestIO_M17N#test_lf_decorator_on_stdout-:1: warning: Unsupported encoding locale ignored
    ```
    headius committed Feb 23, 2016
    Copy the full SHA
    158498f View commit details
  2. Copy the full SHA
    bd5947c View commit details
  3. Copy the full SHA
    d6c4242 View commit details
  4. Copy the full SHA
    83747b9 View commit details
Original file line number Diff line number Diff line change
@@ -431,8 +431,16 @@ public Encoding findEncodingNoError(IRubyObject str) {
return findEncodingCommon(str, false);
}

public Encoding findEncodingNoError(ByteList str) {
return findEncodingCommon(str, false);
}

private Encoding findEncodingCommon(IRubyObject str, boolean error) {
ByteList name = str.convertToString().getByteList();
return findEncodingCommon(name, error);
}

private Encoding findEncodingCommon(ByteList name, boolean error) {
checkAsciiEncodingName(name);

SpecialEncoding special = SpecialEncoding.valueOf(name);
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/util/io/EncodingUtils.java
Original file line number Diff line number Diff line change
@@ -402,13 +402,13 @@ public static void parseModeEncoding(ThreadContext context, IOEncodable ioEncoda
}
}

EncodingDB.Entry idx = service.findEncodingOrAliasEntry(estr.getBytes());
Encoding idx = service.findEncodingNoError(new ByteList(estr.getBytes()));

if (idx == null) {
runtime.getWarnings().warn("Unsupported encoding " + estr + " ignored");
extEnc = null;
} else {
extEnc = idx.getEncoding();
extEnc = idx;
}

intEnc = null;
8 changes: 4 additions & 4 deletions rakelib/test.rake
Original file line number Diff line number Diff line change
@@ -78,22 +78,22 @@ namespace :test do
namespace :mri do
mri_test_files = File.readlines('test/mri.index').grep(/^[^#]\w+/).map(&:chomp).join(' ')
task :int do
ENV['JRUBY_OPTS'] = ENV['JRUBY_OPTS'].to_s + ' -Xbacktrace.style=mri --debug -X-C'
ENV['JRUBY_OPTS'] = ENV['JRUBY_OPTS'].to_s + ' -Xbacktrace.style=mri -Xdebug.fullTrace -X-C'
ruby "-r ./test/mri_test_env.rb test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} -q -- #{mri_test_files}"
end

task :fullint do
ENV['JRUBY_OPTS'] = ENV['JRUBY_OPTS'].to_s + ' -Xbacktrace.style=mri --debug -X-C -Xjit.threshold=0 -Xjit.background=false'
ENV['JRUBY_OPTS'] = ENV['JRUBY_OPTS'].to_s + ' -Xbacktrace.style=mri -Xdebug.fullTrace -X-C -Xjit.threshold=0 -Xjit.background=false'
ruby "-r ./test/mri_test_env.rb test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} -q -- #{mri_test_files}"
end

task :jit do
ENV['JRUBY_OPTS'] = ENV['JRUBY_OPTS'].to_s + ' -Xbacktrace.style=mri --debug -J-XX:MaxPermSize=512M -Xjit.threshold=0 -Xjit.background=false'
ENV['JRUBY_OPTS'] = ENV['JRUBY_OPTS'].to_s + ' -Xbacktrace.style=mri -Xdebug.fullTrace -J-XX:MaxPermSize=512M -Xjit.threshold=0 -Xjit.background=false'
ruby "-r ./test/mri_test_env.rb test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} -q -- #{mri_test_files}"
end

task :aot do
ENV['JRUBY_OPTS'] = ENV['JRUBY_OPTS'].to_s + ' -Xbacktrace.style=mri --debug -J-XX:MaxPermSize=512M -X+C -Xjit.background=false'
ENV['JRUBY_OPTS'] = ENV['JRUBY_OPTS'].to_s + ' -Xbacktrace.style=mri -Xdebug.fullTrace -J-XX:MaxPermSize=512M -X+C -Xjit.background=false'
ruby "-r ./test/mri_test_env.rb test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} -q -- #{mri_test_files}"
end

1 change: 1 addition & 0 deletions test/mri/excludes/TestJSONGenerate.rb
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@
exclude :test_gc, "needs investigation"
exclude :test_hash_likeness_set_string, "needs investigation"
exclude :test_hash_likeness_set_symbol, "needs investigation"
exclude :test_string_subclass, "hard call of json blows up; probably fixed in C ext. https://github.com/flori/json/issues/272"
2 changes: 1 addition & 1 deletion test/mri/ruby/test_thread.rb
Original file line number Diff line number Diff line change
@@ -728,7 +728,7 @@ def test_handle_interrupted?
end

def test_thread_timer_and_ensure
assert_normal_exit(<<_eom, 'r36492', timeout: 3)
assert_normal_exit(<<_eom, 'r36492', timeout: 10)
flag = false
t = Thread.new do
begin