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

Commits on Nov 14, 2016

  1. Update version of jruby

    nplusp authored and headius committed Nov 14, 2016
    Copy the full SHA
    134110c View commit details
  2. Copy the full SHA
    ec127eb View commit details
  3. Copy the full SHA
    62f5320 View commit details
  4. Copy the full SHA
    befa5c5 View commit details
  5. Copy the full SHA
    8aa6f68 View commit details
  6. Copy the full SHA
    c752675 View commit details
  7. Copy the full SHA
    a6385c4 View commit details
  8. 1
    Copy the full SHA
    c162370 View commit details
  9. Copy the full SHA
    fceceab View commit details
  10. Copy the full SHA
    14c4c3d View commit details
  11. Copy the full SHA
    7f1f879 View commit details
  12. Copy the full SHA
    3b8150a View commit details
  13. Copy the full SHA
    fe49a61 View commit details
  14. Copy the full SHA
    b51c5e7 View commit details

Commits on Nov 15, 2016

  1. add Enumerable#sum

    JRuby #4293
    * feature#12217
    phluid61 committed Nov 15, 2016
    Copy the full SHA
    cd79736 View commit details
  2. Copy the full SHA
    fb22d2e View commit details
  3. Actually tag the right test.

    headius committed Nov 15, 2016
    Copy the full SHA
    2689c3f View commit details
  4. Copy the full SHA
    85eec9f View commit details
  5. Copy the full SHA
    a6651aa View commit details
  6. add Array#sum

    JRuby #4293
    * feature#12217
    phluid61 committed Nov 15, 2016
    Copy the full SHA
    62861d6 View commit details
  7. Copy the full SHA
    1452408 View commit details
  8. Copy the full SHA
    0795e08 View commit details
  9. Copy the full SHA
    93d8b8c View commit details
  10. Merge pull request #4296 from kcdragon/md/feature/add-file-empty

    Add File.empty?
    enebo authored Nov 15, 2016
    Copy the full SHA
    e56ded2 View commit details
  11. Trivial changes to match style

    enebo committed Nov 15, 2016
    Copy the full SHA
    83001be View commit details
  12. Merge pull request #4297 from phluid61/feature/12217-enumerable-sum

    Feature#12217 Enumerable/Array sum
    enebo authored Nov 15, 2016
    Copy the full SHA
    067cad1 View commit details
  13. Copy the full SHA
    e8ae240 View commit details

Commits on Nov 16, 2016

  1. Add Dir.empty?

    kcdragon committed Nov 16, 2016
    Copy the full SHA
    33e3ee9 View commit details
  2. Merge pull request #4301 from kcdragon/md/feature/add-dir-empty

    Add `Dir.empty?`
    headius authored Nov 16, 2016
    Copy the full SHA
    665521d View commit details
  3. add Kahan's compensated algorithm for Floats

    Fixes part of a bug identified in #4297
    phluid61 committed Nov 16, 2016
    Copy the full SHA
    be05f1b View commit details
  4. make Array#sum use Enumerable's addition logic

    Partially addresses a bug in #4297
    phluid61 committed Nov 16, 2016
    Copy the full SHA
    343028a View commit details

Commits on Nov 17, 2016

  1. change Array#sum to better match MRI

    Fixes most of the tests that weren't perfect in #4297.
    phluid61 committed Nov 17, 2016
    Copy the full SHA
    8a78908 View commit details
  2. fix Array#sum to handle Fixnum overflow

    This passes the final MRI test, referenced in #4297
    phluid61 committed Nov 17, 2016
    Copy the full SHA
    e49d272 View commit details
  3. Copy the full SHA
    6ea39ea View commit details
  4. Merge pull request #4309 from phluid61/feature/optimise-enumerable-sum

    fix Array#sum and Enumerable#sum
    headius authored Nov 17, 2016
    Copy the full SHA
    46aca6c View commit details
  5. Revert "Allow specs to fail until regression from #4299 is fixed."

    This reverts commit a942825.
    headius committed Nov 17, 2016
    Copy the full SHA
    d548472 View commit details
  6. Copy the full SHA
    f2f2ca2 View commit details
  7. Add Regexp#match?. #4293.

    headius committed Nov 17, 2016
    Copy the full SHA
    689a7ea View commit details
  8. Copy the full SHA
    bd95538 View commit details
  9. Copy the full SHA
    18a68d7 View commit details
  10. Update to rdoc 5.0.0. #4293

    headius committed Nov 17, 2016
    Copy the full SHA
    8717e69 View commit details
  11. Copy the full SHA
    2b59c96 View commit details
  12. Copy the full SHA
    4dd3702 View commit details
  13. Copy the full SHA
    822705a View commit details
  14. Copy the full SHA
    f75647a View commit details
  15. Copy the full SHA
    f723036 View commit details
  16. Copy the full SHA
    a103596 View commit details
  17. Copy the full SHA
    3995a2d View commit details
  18. Copy the full SHA
    3e1131e View commit details
  19. Copy the full SHA
    2d6d9f9 View commit details
Showing 811 changed files with 32,514 additions and 18,918 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.1.11.0-SNAPSHOT
9.2.0.0-SNAPSHOT
8 changes: 5 additions & 3 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -52,12 +52,12 @@
jar 'com.github.jnr:jffi:${jffi.version}'
jar 'com.github.jnr:jffi:${jffi.version}:native'

jar 'org.jruby.joni:joni:2.1.11'
jar 'org.jruby.joni:joni:2.1.12'
jar 'org.jruby.extras:bytelist:1.0.15'
jar 'org.jruby.jcodings:jcodings:1.0.18'
jar 'org.jruby.jcodings:jcodings:1.0.24'
jar 'org.jruby:dirgra:0.3'

jar 'com.headius:invokebinder:1.8-SNAPSHOT'
jar 'com.headius:invokebinder:1.9'
jar 'com.headius:options:1.4'
jar 'com.headius:unsafe-fences:1.0'

@@ -183,6 +183,7 @@
execute_goals( 'compile',
:id => 'default-compile',
:phase => 'compile',
'debug' => 'true',
'annotationProcessors' => [ 'org.jruby.anno.AnnotationBinder' ],
'generatedSourcesDirectory' => 'target/generated-sources',
'compilerArgs' => [ '-XDignore.symbol.file=true',
@@ -192,6 +193,7 @@
execute_goals( 'compile',
:id => 'populators',
:phase => 'process-classes',
'debug' => 'true',
'compilerArgs' => [ '-XDignore.symbol.file=true',
'-J-Duser.language=en',
'-J-Dfile.encoding=UTF-8',
18 changes: 10 additions & 8 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -12,12 +12,12 @@ DO NOT MODIFIY - GENERATED CODE
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-parent</artifactId>
<version>9.1.11.0-SNAPSHOT</version>
<version>9.2.0.0-SNAPSHOT</version>
</parent>
<artifactId>jruby-core</artifactId>
<name>JRuby Core</name>
<properties>
<version.ruby>2.3.3</version.ruby>
<version.ruby>2.4.1</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>
@@ -27,7 +27,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>1</version.ruby.minor>
<tzdata.version>2013d</tzdata.version>
<install4j.executable>/Applications/install4j 4/bin/install4jc</install4j.executable>
<jay.bin>jay</jay.bin>
@@ -39,15 +39,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.3</version.ruby.major>
<version.ruby.major>2.4</version.ruby.major>
<release.dir>release</release.dir>
<create.sources.jar>false</create.sources.jar>
<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>56859</version.ruby.revision>
<version.ruby.revision>58053</version.ruby.revision>
<jruby.test.memory>3G</jruby.test.memory>
<mspec.dir>${spec.dir}/mspec</mspec.dir>
<build.date>${maven.build.timestamp}</build.date>
@@ -173,7 +173,7 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>org.jruby.joni</groupId>
<artifactId>joni</artifactId>
<version>2.1.11</version>
<version>2.1.12</version>
</dependency>
<dependency>
<groupId>org.jruby.extras</groupId>
@@ -183,7 +183,7 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>org.jruby.jcodings</groupId>
<artifactId>jcodings</artifactId>
<version>1.0.18</version>
<version>1.0.24</version>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
@@ -193,7 +193,7 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>com.headius</groupId>
<artifactId>invokebinder</artifactId>
<version>1.8-SNAPSHOT</version>
<version>1.9</version>
</dependency>
<dependency>
<groupId>com.headius</groupId>
@@ -479,6 +479,7 @@ DO NOT MODIFIY - GENERATED CODE
<goal>compile</goal>
</goals>
<configuration>
<debug>true</debug>
<annotationProcessors>
<annotationProcessor>org.jruby.anno.AnnotationBinder</annotationProcessor>
</annotationProcessors>
@@ -498,6 +499,7 @@ DO NOT MODIFIY - GENERATED CODE
<goal>compile</goal>
</goals>
<configuration>
<debug>true</debug>
<compilerArgs>
<compilerArg>-XDignore.symbol.file=true</compilerArg>
<compilerArg>-J-Duser.language=en</compilerArg>
10 changes: 10 additions & 0 deletions core/src/main/java/org/jruby/AbstractRubyMethod.java
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@
package org.jruby;

import org.jruby.anno.JRubyMethod;
import org.jruby.internal.runtime.methods.AliasMethod;
import org.jruby.internal.runtime.methods.DynamicMethod;
import org.jruby.internal.runtime.methods.IRMethodArgs;
import org.jruby.internal.runtime.methods.UndefinedMethod;
@@ -154,5 +155,14 @@ protected IRubyObject super_method(ThreadContext context, IRubyObject receiver,
return RubyMethod.newMethod(superClass, methodName, superClass, originName, newMethod, receiver);
}
}

@JRubyMethod
public IRubyObject original_name(ThreadContext context) {
if (method instanceof AliasMethod) {
return context.runtime.newSymbol(((AliasMethod) method).getOldName());
}

return context.runtime.newSymbol(method.getName());
}
}

109 changes: 61 additions & 48 deletions core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -52,7 +52,9 @@
import org.jruby.ast.WhileNode;
import org.jruby.compiler.Constantizable;
import org.jruby.compiler.NotCompilableException;
import org.jruby.ext.thread.ThreadLibrary;
import org.jruby.ext.thread.ConditionVariable;
import org.jruby.ext.thread.Mutex;
import org.jruby.ext.thread.SizedQueue;
import org.jruby.ir.IRScope;
import org.jruby.ir.IRScriptBody;
import org.jruby.ir.instructions.Instr;
@@ -1372,6 +1374,8 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
falseObject.setFrozen(true);
trueObject = new RubyBoolean.True(this);
trueObject.setFrozen(true);

reportOnException = falseObject;
}

private void initCore() {
@@ -1526,6 +1530,8 @@ private void initCore() {
}

TracePoint.createTracePointClass(this);

RubyWarnings.createWarningModule(this);
}

public static final int NIL_PREFILLED_ARRAY_SIZE = RubyArray.ARRAY_DEFAULT_SIZE * 8;
@@ -1612,7 +1618,10 @@ private void initExceptions() {
}

private void initLibraries() {
new ThreadLibrary().load(this, false);
Mutex.setup(this);
ConditionVariable.setup(this);
org.jruby.ext.thread.Queue.setup(this);
SizedQueue.setup(this);
new ThreadFiberLibrary().load(this, false);
}

@@ -1692,8 +1701,6 @@ private void initBuiltins() {
addLazyBuiltin("stringio.jar", "stringio", "org.jruby.ext.stringio.StringIOLibrary");
addLazyBuiltin("strscan.jar", "strscan", "org.jruby.ext.strscan.StringScannerLibrary");
addLazyBuiltin("zlib.jar", "zlib", "org.jruby.ext.zlib.ZlibLibrary");
addLazyBuiltin("thread.jar", "thread", "org.jruby.ext.thread.ThreadLibrary");
addLazyBuiltin("thread.rb", "thread", "org.jruby.ext.thread.ThreadLibrary");
addLazyBuiltin("digest.jar", "digest.so", "org.jruby.ext.digest.DigestLibrary");
addLazyBuiltin("digest/md5.jar", "digest/md5", "org.jruby.ext.digest.MD5");
addLazyBuiltin("digest/rmd160.jar", "digest/rmd160", "org.jruby.ext.digest.RMD160");
@@ -2340,6 +2347,14 @@ public void setLocation(RubyClass location) {
this.locationClass = location;
}

public RubyModule getWarning() {
return warningModule;
}

public void setWarning(RubyModule warningModule) {
this.warningModule = warningModule;
}

public RubyModule getErrno() {
return errnoModule;
}
@@ -3852,6 +3867,13 @@ public RaiseException newIllegalSequence(String message) {
return newRaiseException(getClass("Iconv").getClass("IllegalSequence"), message);
}

/**
* @see Ruby#newNameError(String, IRubyObject, IRubyObject, boolean)
*/
public RaiseException newNameError(String message, IRubyObject recv, IRubyObject name) {
return newNameError(message, recv, name, false);
}

/**
* Construct a NameError that formats its message with an sprintf format string.
*
@@ -3869,11 +3891,12 @@ public RaiseException newIllegalSequence(String message) {
* @param message an sprintf format string for the message
* @param recv the receiver object
* @param name the name that failed
* @param privateCall whether the failure was due to method visibility
* @return a new NameError
*/
public RaiseException newNameError(String message, IRubyObject recv, IRubyObject name) {
public RaiseException newNameError(String message, IRubyObject recv, IRubyObject name, boolean privateCall) {
IRubyObject msg = new RubyNameError.RubyNameErrorMessage(this, message, recv, name);
RubyException err = RubyNameError.newNameError(getNameError(), msg, name);
RubyException err = RubyNameError.newNameError(getNameError(), msg, name, privateCall);

return new RaiseException(err);
}
@@ -3886,8 +3909,19 @@ public RaiseException newNameError(String message, IRubyObject recv, IRubyObject
* @see Ruby#newNameError(String, IRubyObject, IRubyObject)
*/
public RaiseException newNameError(String message, IRubyObject recv, String name) {
return newNameError(message, recv, name, false);
}

/**
* Construct a NameError that formats its message with an sprintf format string and has private_call? set to given.
*
* This version just accepts a java.lang.String for the name.
*
* @see Ruby#newNameError(String, IRubyObject, IRubyObject)
*/
public RaiseException newNameError(String message, IRubyObject recv, String name, boolean privateCall) {
RubySymbol nameSym = newSymbol(name);
return newNameError(message, recv, nameSym);
return newNameError(message, recv, nameSym, privateCall);
}

/**
@@ -3943,6 +3977,13 @@ public RaiseException newNameError(String message, String name, Throwable origEx
return newNameError(message, name, origException, false);
}

/**
* @see Ruby#newNoMethodError(String, IRubyObject, String, RubyArray, boolean)
*/
public RaiseException newNoMethodError(String message, IRubyObject recv, String name, RubyArray args) {
return newNoMethodError(message, recv, name, args, false);
}

/**
* Construct a NoMethodError that formats its message with an sprintf format string.
*
@@ -3953,10 +3994,10 @@ public RaiseException newNameError(String message, String name, Throwable origEx
*
* @return a new NoMethodError
*/
public RaiseException newNoMethodError(String message, IRubyObject recv, String name, RubyArray args) {
public RaiseException newNoMethodError(String message, IRubyObject recv, String name, RubyArray args, boolean privateCall) {
RubySymbol nameStr = newSymbol(name);
IRubyObject msg = new RubyNameError.RubyNameErrorMessage(this, message, recv, nameStr);
RubyException err = RubyNoMethodError.newNoMethodError(getNoMethodError(), msg, nameStr, args);
RubyException err = RubyNoMethodError.newNoMethodError(getNoMethodError(), msg, nameStr, args, privateCall);

return new RaiseException(err);
}
@@ -4037,44 +4078,7 @@ public RaiseException newStandardError(String message) {
* TODO: Should we include this into Errno code somewhere do we can use this from other places as well?
*/
public RaiseException newIOErrorFromException(final IOException ex) {
final String errorMessage = ex.getMessage();
if ( errorMessage != null ) {
// All errors to sysread should be SystemCallErrors, but on a closed stream
// Ruby returns an IOError. Java throws same exception for all errors so
// we resort to this hack...
switch ( errorMessage ) {
case "Bad file descriptor" :
if ( ex instanceof ClosedChannelException ) throw newErrnoEBADFError();
break;
case "File not open" :
return newIOError(errorMessage);
case "An established connection was aborted by the software in your host machine" :
return newErrnoECONNABORTEDError();
case "Broken pipe" :
return newErrnoEPIPEError();
case "Connection reset by peer" :
case "An existing connection was forcibly closed by the remote host" :
return newErrnoECONNRESETError();
case "Too many levels of symbolic links" :
return newErrnoELOOPError();
case "Too many open files" :
return newErrnoEMFILEError();
case "Too many open files in system" :
return newErrnoENFILEError();
case "Network is unreachable" :
return newErrnoENETUNREACHError();
case "Address already in use" :
return newErrnoEADDRINUSEError();
default :
if ( Platform.IS_WINDOWS ) {
if ( errorMessage.contains("connection was aborted") ) {
return newErrnoECONNRESETError();
}
}
}
return newRaiseException(getIOError(), errorMessage);
}
return newRaiseException(getIOError(), "IO Error");
return Helpers.newIOErrorFromException(this, ex);
}

public RaiseException newTypeError(IRubyObject receivedObject, RubyClass expectedType) {
@@ -4226,6 +4230,14 @@ public void setGlobalAbortOnExceptionEnabled(boolean enable) {
globalAbortOnExceptionEnabled = enable;
}

public IRubyObject getReportOnException() {
return reportOnException;
}

public void setReportOnException(IRubyObject enable) {
reportOnException = enable;
}

public boolean isDoNotReverseLookupEnabled() {
return doNotReverseLookupEnabled;
}
@@ -4866,6 +4878,7 @@ private MRIRecursionGuard oldRecursionGuard() {
private volatile EventHook[] eventHooks = EMPTY_HOOKS;
private boolean hasEventHooks;
private boolean globalAbortOnExceptionEnabled = false;
private IRubyObject reportOnException;
private boolean doNotReverseLookupEnabled = false;
private volatile boolean objectSpaceEnabled;
private boolean siphashEnabled;
@@ -4919,7 +4932,7 @@ private MRIRecursionGuard oldRecursionGuard() {
kernelModule, comparableModule, enumerableModule, mathModule,
marshalModule, etcModule, fileTestModule, gcModule,
objectSpaceModule, processModule, procUIDModule, procGIDModule,
procSysModule, precisionModule, errnoModule;
procSysModule, precisionModule, errnoModule, warningModule;

private DynamicMethod privateMethodMissing, protectedMethodMissing, variableMethodMissing,
superMethodMissing, normalMethodMissing, defaultMethodMissing, defaultModuleMethodMissing,
Loading