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: 35323f684e6a
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d7089435c941
Choose a head ref

Commits on Nov 20, 2015

  1. Update Ruby version numbers.

    headius committed Nov 20, 2015
    Copy the full SHA
    14ba348 View commit details
  2. Copy the full SHA
    a8eab95 View commit details
  3. implement Coverage.peek_result

    This patch implements `Coverage.peek_result` that was implemented in MRI
    here:
    
      https://bugs.ruby-lang.org/issues/10816
    tenderlove committed Nov 20, 2015
    Copy the full SHA
    ced60e8 View commit details
  4. Merge branch 'peek_result' of https://github.com/tenderlove/jruby int…

    …o tenderlove-peek_result
    headius committed Nov 20, 2015
    Copy the full SHA
    0717e88 View commit details
  5. Copy the full SHA
    4ad378d View commit details

Commits on Nov 21, 2015

  1. Copy the full SHA
    62b4dbc View commit details
  2. Copy the full SHA
    d43ad7a View commit details
  3. Copy the full SHA
    5fc4742 View commit details

Commits on Nov 22, 2015

  1. Copy the full SHA
    81d2e14 View commit details

Commits on Nov 23, 2015

  1. Enumerable#chunk and Enumerable#slice_before no longer takes the init…

    …ial_state argument [Feature #10958]
    MSNexploder committed Nov 23, 2015
    Copy the full SHA
    0c93f88 View commit details
  2. Merge pull request #3490 from MSNexploder/feature_10958

    remove "initial_state" argument of Enumerable#{slice_before,chunk}
    headius committed Nov 23, 2015
    Copy the full SHA
    bb8807f View commit details
  3. Copy the full SHA
    23f4d15 View commit details

Commits on Nov 25, 2015

  1. Merge branch 'master' into ruby-2.3

    * master: (29 commits)
      [travis-ci] revert jdk 9 testing from 2fa04aa
      Eliminate Block.Type arg in BlockBody yield/call signatures
      Pass Block instead of Binding in BlockBody.yield/call
      Minor: fix typo in name of runtime helper instr method name
      Update to jnr-unixsocket 0.10.
      Improve CamelCase package splitting. Fixes #3493.
      Update to jnr-unixsocket 0.10-SNAPSHOT for forFD.
      [Truffle] j+tr: support for passing any extra ruby options
      each_object(cls.singleton_class) should not walk special classes.
      This test has been moved to RubySpec.
      [Truffle] Typo.
      [Truffle] Tag failing regex specs.
      [Truffle] Tag failing Time.at spec.
      The bin200 distribution has grown in size.
      [Truffle] Fixed two typos of the same word on the same line of code.
      [Truffle] Simplified the fix in 5446cc2.
      [Truffle] Fixed an NPE when a SharedMethodInfo has a null argumentsDescriptors.
      [Truffle] Fixed the interpreter_path when the root JRuby distribution directory is not named "jruby."
      Fixes #3483. define_method with empty body throws RuntimeError in interpreter
      Test main on Java 9
      ...
    kares committed Nov 25, 2015
    Copy the full SHA
    f7f0818 View commit details
  2. Merge pull request #3486 from lucasallan/ruby-2.3-fetch_values

    [Ruby-2.3] - Implements Hash#fetch_values
    kares committed Nov 25, 2015
    Copy the full SHA
    c57a47e View commit details
  3. Copy the full SHA
    de0dd50 View commit details
  4. Copy the full SHA
    5efdd34 View commit details
  5. Copy the full SHA
    e056236 View commit details

Commits on Nov 26, 2015

  1. Copy the full SHA
    7d48171 View commit details
  2. Copy the full SHA
    55fdd00 View commit details
  3. Merge branch 'master' into ruby-2.3

    * master:
      PushBindingInstr -> PushMethodBindingInstr
      Push/PopFrameInstr --> Push/PopMethodFrameInstr
      Change interpret sigs to distinguish between executing block and blockArg
      Rename block to blockArg in interpreter for clarity
      Remove one more line of code left behind that broke the build
      Remove changes to Block.java accidentally committed in 5e13527
      Next step in refactoring block body signature for improved clarity
      Rename arguments in blockBody signatures for easier understanding
      [Truffle] findbugs: fix missing locale in toUpperCase
      [Truffle] code style
      [Truffle] fix Time#localtime
    kares committed Nov 26, 2015
    Copy the full SHA
    43d80c3 View commit details
  4. Copy the full SHA
    5096fee View commit details
  5. Merge pull request #3498 from lucasallan/grep_v

    [Ruby-2.3] - Implements Enumerable#grep_v
    kares committed Nov 26, 2015
    Copy the full SHA
    516792f View commit details

Commits on Nov 30, 2015

  1. Copy the full SHA
    70a6497 View commit details

Commits on Dec 1, 2015

  1. Merge pull request #3497 from lucasallan/negative-positive-numeric

    [Ruby-2.3] - Implements Numeric#positive? and Numeric#negative?
    enebo committed Dec 1, 2015
    Copy the full SHA
    c051b56 View commit details
  2. Merge pull request #3506 from lucasallan/thread-name

    [Ruby-2.3] - Implements Thread#name and Thread#name=
    enebo committed Dec 1, 2015
    Copy the full SHA
    65630e7 View commit details

Commits on Dec 2, 2015

  1. Copy the full SHA
    1702f89 View commit details
  2. avoid BlockBody in Hash#to_proc impl - instead do all logic in RubyPr…

    …oc sub-class
    
    also revert the protected block field in RubyProc introduced due previous hack
    
    as advised in #2499
    kares committed Dec 2, 2015
    Copy the full SHA
    3c8048b View commit details
  3. Copy the full SHA
    8b7e43a View commit details
  4. Copy the full SHA
    b9af4e2 View commit details
  5. Copy the full SHA
    5d8f753 View commit details
  6. Copy the full SHA
    5a46bfb View commit details
  7. Copy the full SHA
    b2cac04 View commit details
  8. NullBlockBody should return null on getFile - gets Proc's formatted a…

    …ccording to MRI
    
    prev: #<Proc:0x25a664f6@(null):0> after: #<Proc:0x1d549387> on Hash#to_proc
    kares committed Dec 2, 2015
    Copy the full SHA
    a4ab413 View commit details
  9. Merge branch 'master' into ruby-2.3

    * master: (23 commits)
      Fix build
      Add tags for new failing specs.
      do not raise when precision is passed to BigDecimal#round
      [Truffle] BigDecimal#round do not raise FloatDomainError when precision is used
      [Truffle] Float#to_s slow compatibility implementation
      [Truffle] code style
      [Truffle] Fix rand spec filename.
      [Truffle] Let InternalMethod visit itself.
      [Truffle] Remember the Proc for a define_method, as it may access the block declaration frame.
      [Truffle] Tag new failing specs.
      [Truffle] Add Method#[] as an alias to #call.
      [Truffle] Fix style.
      Squashed 'spec/ruby/' changes from 92311a8..cfdf72f
      Plug in Push/Pop Frame/Binding instructions into the interpreter
      Fix buggy updates from previous commit.
      Add Block variants of push/pop frame/binding instructions
      More tweaks to interpreter signatures
      Rename some IRVisitor methods
      sprintf: test infinite and nan float values
      [Truffle] fix formating of infinite and nan floats
      ...
    kares committed Dec 2, 2015
    Copy the full SHA
    adbdeab View commit details
  10. Merge pull request #3510 from lucasallan/pathname-enumerator

    [Ruby-2.3] - Pathname#descend and Pathname#ascend supported blockless…
    kares committed Dec 2, 2015
    Copy the full SHA
    739df89 View commit details
  11. Copy the full SHA
    8e7bbc0 View commit details

Commits on Dec 3, 2015

  1. Copy the full SHA
    c1f7c66 View commit details
  2. Copy the full SHA
    2377b3c View commit details
  3. Copy the full SHA
    8a25977 View commit details
  4. Copy the full SHA
    881aa99 View commit details
  5. Copy the full SHA
    cf23935 View commit details

Commits on Dec 4, 2015

  1. Copy the full SHA
    ac1456d View commit details
  2. include a per-runtime thread counter in Ruby thread names reported on…

    … the Java side
    
    ... instead of using the previous "Thread-" + counter++ global JVM thread counter
    kares committed Dec 4, 2015
    Copy the full SHA
    d468d2a View commit details
  3. handle thread name failure when running JIT-ed ... file is coming bac…

    …k as "" and line as 0
    kares committed Dec 4, 2015
    Copy the full SHA
    4329052 View commit details
  4. Copy the full SHA
    b0e998c View commit details
  5. Copy the full SHA
    50a21e8 View commit details
  6. Copy the full SHA
    5cdc065 View commit details
  7. Copy the full SHA
    c89f25f View commit details

Commits on Dec 5, 2015

  1. Copy the full SHA
    1ebd549 View commit details
  2. Copy the full SHA
    2cb70d2 View commit details
Showing 1,552 changed files with 42,088 additions and 23,353 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -74,6 +74,8 @@ matrix:
jdk: oraclejdk8
- env: COMMAND=test/check_versions.sh
jdk: oraclejdk8
#- env: JT=check_ambiguous_arguments
# jdk: oraclejdk8
allow_failures:
- env: PHASE='-Prake -Dtask=test:mri:fullint'
- env: JT=check_ambiguous_arguments
@@ -92,6 +94,7 @@ branches:
- truffle-head
- /^test-.*$/
- /^ha-feature/
- ruby-2.3

script: tool/travis_runner.sh
install: travis_retry ./mvnw -Pbootstrap clean install -B -Dinvoker.skip -Dmaven.test.skip
2 changes: 1 addition & 1 deletion core/pom.rb
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@
jar 'com.github.jnr:jffi:${jffi.version}'
jar 'com.github.jnr:jffi:${jffi.version}:native'

jar 'org.jruby.joni:joni:2.1.9'
jar 'org.jruby.joni:joni:2.1.10-SNAPSHOT'
jar 'org.jruby.extras:bytelist:1.0.13'
jar 'org.jruby.jcodings:jcodings:1.0.17'
jar 'org.jruby:dirgra:0.3'
10 changes: 5 additions & 5 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ DO NOT MODIFIY - GENERATED CODE
<artifactId>jruby-core</artifactId>
<name>JRuby Core</name>
<properties>
<version.ruby>2.2.3</version.ruby>
<version.ruby>2.3.0</version.ruby>
<prawn.dir>${test.dir}/prawn</prawn.dir>
<spec.tags.dir>${spec.dir}/tags</spec.tags.dir>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
@@ -28,7 +28,7 @@ DO NOT MODIFIY - GENERATED CODE
<jruby.test.memory.permgen>2G</jruby.test.memory.permgen>
<installer.gems>${jruby.win32ole.gem}</installer.gems>
<prawn.git.repo>git://github.com/sandal/prawn.git</prawn.git.repo>
<version.ruby.minor>3</version.ruby.minor>
<version.ruby.minor>0</version.ruby.minor>
<tzdata.version>2013d</tzdata.version>
<install4j.executable>/Applications/install4j 4/bin/install4jc</install4j.executable>
<jay.bin>jay</jay.bin>
@@ -40,15 +40,15 @@ DO NOT MODIFIY - GENERATED CODE
<rubyspec.1.8.dir>${rubyspec.dir}/1.8</rubyspec.1.8.dir>
<jruby.launch.memory>1024M</jruby.launch.memory>
<jruby.compile.memory>2G</jruby.compile.memory>
<version.ruby.major>2.2</version.ruby.major>
<version.ruby.major>2.3</version.ruby.major>
<unsafe.version>8.0</unsafe.version>
<release.dir>release</release.dir>
<lib.dir>lib</lib.dir>
<rails.dir>${test.dir}/rails</rails.dir>
<parser.dir>core/src/main/java/org/jruby/parser</parser.dir>
<jruby.basedir>${basedir}/..</jruby.basedir>
<rubyspec.dir>${spec.dir}/ruby</rubyspec.dir>
<version.ruby.revision>51636</version.ruby.revision>
<version.ruby.revision>52539</version.ruby.revision>
<jruby.test.memory>3G</jruby.test.memory>
<mspec.dir>${spec.dir}/mspec</mspec.dir>
<build.date>${maven.build.timestamp}</build.date>
@@ -174,7 +174,7 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>org.jruby.joni</groupId>
<artifactId>joni</artifactId>
<version>2.1.9</version>
<version>2.1.10-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jruby.extras</groupId>
17 changes: 7 additions & 10 deletions core/src/main/java/org/jruby/NativeException.java
Original file line number Diff line number Diff line change
@@ -42,18 +42,15 @@ public class NativeException extends RubyException {

private final Throwable cause;
public static final String CLASS_NAME = "NativeException";
private final Ruby runtime;

public NativeException(Ruby runtime, RubyClass rubyClass, Throwable cause) {
super(runtime, rubyClass);
this.runtime = runtime;
this.cause = cause;
this.message = runtime.newString(cause.getClass().getName() + ": " + searchStackMessage(cause));
}

private NativeException(Ruby runtime, RubyClass rubyClass) {
super(runtime, rubyClass);
this.runtime = runtime;
this.cause = new Throwable();
this.message = runtime.newString();
}
@@ -84,6 +81,7 @@ public IRubyObject backtrace() {
if (rubyTrace.isNil()) {
return rubyTrace;
}
final Ruby runtime = getRuntime();
RubyArray array = (RubyArray) rubyTrace.dup();
StackTraceElement[] stackTrace = cause.getStackTrace();
for (int i = stackTrace.length - 1; i >= 0; i--) {
@@ -97,12 +95,12 @@ public IRubyObject backtrace() {
final String packageName = index == -1 ? "" : className.substring(0, index) + '/';
line = packageName.replace('.', '/') + element.getFileName() + ':' + element.getLineNumber() + ":in `" + element.getMethodName() + '\'';
}
RubyString string = runtime.newString(line);
array.unshift(string);
array.unshift(runtime.newString(line));
}
return array;
}

@Deprecated // not used
public void trimStackTrace(Member target) {
Throwable t = new Throwable();
StackTraceElement[] origStackTrace = cause.getStackTrace();
@@ -143,19 +141,18 @@ public void trimStackTrace(Member target) {

public void printBacktrace(PrintStream errorStream) {
super.printBacktrace(errorStream);
if (getRuntime().getDebug().isTrue()) {
if (getRuntime().isDebug()) {
errorStream.println("Complete Java stackTrace");
cause.printStackTrace(errorStream);
}
}

public Throwable getCause() {
public final Throwable getCause() {
return cause;
}

private String searchStackMessage(Throwable cause) {
String message = null;

private static String searchStackMessage(Throwable cause) {
String message;
do {
message = cause.getMessage();
cause = cause.getCause();
83 changes: 67 additions & 16 deletions core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -1275,13 +1275,21 @@ && getInstanceConfig().getCompileMode() != CompileMode.TRUFFLE) {
// out of base boot mode
bootingCore = false;

// init Ruby-based kernel
if (getInstanceConfig().getCompileMode() != CompileMode.TRUFFLE) {
// init Ruby-based kernel
initRubyKernel();
}

// everything booted, so SizedQueue should be available; set up root fiber
if (getInstanceConfig().getCompileMode() != CompileMode.TRUFFLE) {
// Define blank modules for feature detection in preludes
if (!config.isDisableGems()) {
defineModule("Gem");
}
if (!config.isDisableDidYouMean()) {
defineModule("DidYouMean");
}

initRubyPreludes();

// everything booted, so SizedQueue should be available; set up root fiber
ThreadFiber.initRootFiber(tc);
}

@@ -1332,6 +1340,7 @@ private boolean doesReflectionWork() {
private void bootstrap() {
initCore();
initExceptions();
initLibraries();
}

private void initDefinedMessages() {
@@ -1414,7 +1423,9 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
singleNilArray = new IRubyObject[] {nilObject};

falseObject = new RubyBoolean.False(this);
falseObject.setFrozen(true);
trueObject = new RubyBoolean.True(this);
trueObject.setFrozen(true);
}

private void initCore() {
@@ -1570,11 +1581,6 @@ private void initCore() {
RubyEnumerator.defineEnumerator(this);
}

// Fiber depends on thread library, so we load it here
new ThreadLibrary().load(this, false);

new ThreadFiberLibrary().load(this, false);

TracePoint.createTracePointClass(this);
}

@@ -1616,6 +1622,9 @@ private void initExceptions() {
interrupt = defineClassIfAllowed("Interrupt", signalException);
typeError = defineClassIfAllowed("TypeError", standardError);
argumentError = defineClassIfAllowed("ArgumentError", standardError);
if (profile.allowClass("UncaughtThrowError")) {
uncaughtThrowError = RubyUncaughtThrowError.createUncaughtThrowErrorClass(this, argumentError);
}
indexError = defineClassIfAllowed("IndexError", standardError);
if (profile.allowClass("StopIteration")) {
stopIteration = RubyStopIteration.createStopIterationClass(this, indexError);
@@ -1655,6 +1664,11 @@ private void initExceptions() {
initErrno();
}

private void initLibraries() {
new ThreadLibrary().load(this, false);
new ThreadFiberLibrary().load(this, false);
}

private RubyClass defineClassIfAllowed(String name, RubyClass superClass) {
// TODO: should probably apply the null object pattern for a
// non-allowed class, rather than null
@@ -1786,6 +1800,14 @@ private void initRubyKernel() {
loadService.loadFromClassLoader(getClassLoader(), "jruby/kernel.rb", false);
}

private void initRubyPreludes() {
// We cannot load any .rb and debug new parser features
if (RubyInstanceConfig.DEBUG_PARSER) return;

// load Ruby parts of core
loadService.loadFromClassLoader(getClassLoader(), "jruby/preludes.rb", false);
}

private void addLazyBuiltin(String name, String shortName, String className) {
addBuiltinIfAllowed(name, new LateLoadingLibrary(shortName, className, getClassLoader()));
}
@@ -2435,6 +2457,10 @@ public RubyClass getArgumentError() {
return argumentError;
}

public RubyClass getUncaughtThrowError() {
return uncaughtThrowError;
}

public RubyClass getIndexError() {
return indexError;
}
@@ -2902,7 +2928,11 @@ public void loadFile(String scriptName, InputStream in, boolean wrap) {
// toss an anonymous module into the search path
RubyModule wrapper = RubyModule.newModule(this);
((RubyBasicObject)self).extend(new IRubyObject[] {wrapper});
((RootNode) parseResult).getStaticScope().setModule(wrapper);
RootNode root = (RootNode) parseResult;
StaticScope top = root.getStaticScope();
StaticScope newTop = staticScopeFactory.newLocalScope(null);
top.setPreviousCRefScope(newTop);
top.setModule(wrapper);
}

runInterpreter(context, parseResult, self);
@@ -3859,12 +3889,14 @@ public RaiseException newNotImplementedError(String message) {
return newRaiseException(getNotImplementedError(), message);
}

@Deprecated
public RaiseException newInvalidEncoding(String message) {
return newRaiseException(fastGetClass("Iconv").getClass("InvalidEncoding"), message);
return newRaiseException(getClass("Iconv").getClass("InvalidEncoding"), message);
}

@Deprecated
public RaiseException newIllegalSequence(String message) {
return newRaiseException(fastGetClass("Iconv").getClass("IllegalSequence"), message);
return newRaiseException(getClass("Iconv").getClass("IllegalSequence"), message);
}

public RaiseException newNoMethodError(String message, String name, IRubyObject args) {
@@ -3875,7 +3907,7 @@ public RaiseException newNameError(String message, String name) {
return newNameError(message, name, null);
}

// This name sucks and should be replaced by newNameErrorfor 9k.
@Deprecated
public RaiseException newNameErrorObject(String message, IRubyObject name) {
RubyException error = new RubyNameError(this, getNameError(), message, name);

@@ -3886,6 +3918,26 @@ public RaiseException newNameError(String message, String name, Throwable origEx
return newNameError(message, name, origException, false);
}

public RaiseException newNameError(String message, IRubyObject recv, IRubyObject name) {
IRubyObject msg = new RubyNameError.RubyNameErrorMessage(this, message, recv, name);
RubyException err = RubyNameError.newNameError(getNameError(), msg, name);

return new RaiseException(err);
}

public RaiseException newNameError(String message, IRubyObject recv, String name) {
RubySymbol nameSym = newSymbol(name);
return newNameError(message, recv, nameSym);
}

public RaiseException newNoMethodError(String message, IRubyObject recv, String name, RubyArray args) {
RubySymbol nameStr = newSymbol(name);
IRubyObject msg = new RubyNameError.RubyNameErrorMessage(this, message, recv, nameStr);
RubyException err = RubyNoMethodError.newNoMethodError(getNoMethodError(), msg, nameStr, args);

return new RaiseException(err);
}

public RaiseException newNameError(String message, String name, Throwable origException, boolean printWhenVerbose) {
if (origException != null) {
if (printWhenVerbose && isVerbose()) {
@@ -3895,8 +3947,7 @@ public RaiseException newNameError(String message, String name, Throwable origEx
}
}

return new RaiseException(new RubyNameError(
this, getNameError(), message, name), false);
return new RaiseException(new RubyNameError(this, getNameError(), message, name), false);
}

public RaiseException newLocalJumpError(RubyLocalJumpError.Reason reason, IRubyObject exitValue, String message) {
@@ -4926,7 +4977,7 @@ public FilenoUtil getFilenoUtil() {
groupStruct, procStatusClass, exceptionClass, runtimeError, ioError,
scriptError, nameError, nameErrorMessage, noMethodError, signalException,
rangeError, dummyClass, systemExit, localJumpError, nativeException,
systemCallError, fatal, interrupt, typeError, argumentError, indexError, stopIteration,
systemCallError, fatal, interrupt, typeError, argumentError, uncaughtThrowError, indexError, stopIteration,
syntaxError, standardError, loadError, notImplementedError, securityError, noMemoryError,
regexpError, eofError, threadError, concurrencyError, systemStackError, zeroDivisionError, floatDomainError, mathDomainError,
encodingError, encodingCompatibilityError, converterNotFoundError, undefinedConversionError,
Loading