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: 020d8a1403e7
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9ddd8a117729
Choose a head ref
  • 6 commits
  • 7 files changed
  • 1 contributor

Commits on Feb 17, 2016

  1. Copy the full SHA
    3565806 View commit details
  2. Missing warnings in Dir glob.

    headius committed Feb 17, 2016
    Copy the full SHA
    819dfc0 View commit details
  3. Copy the full SHA
    7ef9680 View commit details
  4. Yield array of single element for slice_when with one element.

    See MRI TestEnumerable#test_slice_when_1.
    headius committed Feb 17, 2016
    Copy the full SHA
    a8eff5d View commit details

Commits on Feb 18, 2016

  1. Copy the full SHA
    34e0bc6 View commit details
  2. Copy the full SHA
    9ddd8a1 View commit details
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyException.java
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ private void setBacktrace(IRubyObject obj) {
} else if (obj instanceof RubyString) {
backtrace = RubyArray.newArray(getRuntime(), obj);
} else {
throw getRuntime().newTypeError("backtrace must be Array of String or a single String");
throw getRuntime().newTypeError("backtrace must be Array of String");
}
}

2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyGlobal.java
Original file line number Diff line number Diff line change
@@ -750,7 +750,7 @@ public IRubyObject get() {
@Override
public IRubyObject set(IRubyObject value) {
if (runtime.getGlobalVariables().get("$!").isNil()) {
throw runtime.newArgumentError("$! not set.");
throw runtime.newArgumentError("$! not set");
}
runtime.getGlobalVariables().get("$!").callMethod(value.getRuntime().getCurrentContext(), "set_backtrace", value);
return value;
2 changes: 2 additions & 0 deletions core/src/main/java/org/jruby/runtime/backtrace/TraceType.java
Original file line number Diff line number Diff line change
@@ -334,6 +334,8 @@ protected static String printBacktraceMRI(RubyException exception, boolean conso

if (path != null) {
errorStream.print(" (" + path + ")\n");
} else {
errorStream.print('\n');
}

if (tail != null) {
32 changes: 18 additions & 14 deletions core/src/main/ruby/jruby/kernel/enumerable.rb
Original file line number Diff line number Diff line change
@@ -69,24 +69,28 @@ def slice_when(&block)
Enumerator.new do |enum|
ary = nil
last_after = nil
each_cons(2) do |before, after|
last_after = after
match = block.call before, after
if size == 1
each {|x| enum.yield [x]}
else
each_cons(2) do |before, after|
last_after = after
match = block.call before, after

ary ||= []
if match
ary << before
enum.yield ary
ary = []
else
ary << before
end
end

ary ||= []
if match
ary << before
unless ary.nil?
ary << last_after
enum.yield ary
ary = []
else
ary << before
end
end

unless ary.nil?
ary << last_after
enum.yield ary
end
end
end

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

task :fullint do
ruby "-Xjit.threshold=0 -Xjit.background=false -X-C -r ./test/mri_test_env.rb test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} -q -- #{mri_test_files}"
ruby "-Xjit.threshold=0 -Xjit.background=false -Xbacktrace.style=mri -X-C -r ./test/mri_test_env.rb test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} -q -- #{mri_test_files}"
end

task :jit do
ruby "-J-XX:MaxPermSize=512M -Xjit.threshold=0 -Xjit.background=false -r ./test/mri_test_env.rb test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} -q -- #{mri_test_files}"
ruby "-J-XX:MaxPermSize=512M -Xjit.threshold=0 -Xjit.background=false -Xbacktrace.style=mri -r ./test/mri_test_env.rb test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} -q -- #{mri_test_files}"
end

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

task all: %s[int jit aot]
4 changes: 4 additions & 0 deletions test/mri/excludes/TestDir_M17N.rb
Original file line number Diff line number Diff line change
@@ -10,5 +10,9 @@
exclude :test_filename_utf8_raw_jp_name, "broken subprocess logic in setup"
exclude :test_filename_utf8_raw_windows_1251_name, "broken subprocess logic in setup"
exclude :test_filename_utf8_raw_windows_1252_name, "broken subprocess logic in setup"
exclude :test_glob_encoding, "we always normalize to Unicode internally"
exclude :test_glob_incompatible, "needs investigation"
exclude :test_glob_warning_match_all, "missing warning"
exclude :test_glob_warning_match_dir, "missing warning"
exclude :test_glob_warning_opendir, "missing warning"
exclude :test_inspect_nonascii, "needs investigation"
1 change: 1 addition & 0 deletions test/mri/excludes/TestException.rb
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
recover from such situation.
]

exclude test_errinfo_encoding_in_debug, "parser issue with Japanese encodings (https://github.com/jruby/jruby/issues/3679)"
exclude /test_machine_stackoverflow/, reason
exclude :test_machine_stackoverflow_by_define_method, reason
exclude :test_name_error_local_variables, "NameError#local_variables is internal and specific to MRI"