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

Commits on Mar 20, 2015

  1. adjust the big-decimal fix

    mkristian committed Mar 20, 2015
    Copy the full SHA
    e66cbd5 View commit details

Commits on Mar 24, 2015

  1. 2
    Copy the full SHA
    9017d21 View commit details
  2. Squashed 'spec/ruby/' changes from 2e07d5c..19ff319

    19ff319 Dir#close no longer raises an IOError if already closed
    88b128c Revert "filesystem encoding is fixed on Windows and Darwin"
    d3dc4c7 fix indentation
    8bad4cf Fix a couple version guards to be simpler.
    d098f8d Removed outdated version guards in language.
    ee056dc Removed outdated version guards in core.
    3ceb9ae Remove old rational library specs.
    7454d72 Remove outdated complex library specs.
    750c6f5 Removed outdated version guards.
    6fd11ee Restore ruby_bug guard #8342 as it is not yet fixed.
    24a9aec Restore ruby_bug guard #10894 as it is not yet fixed.
    29da602 Remove outdated ruby_bug in commented code.
    2ec6fc2 Remove ruby_bug guards for ruby <= 2.0.
    96205bd Fix the encoding the e acute in Dir#pwd spec.
    22b206d filesystem encoding is fixed on Windows and Darwin
    01ec347 RuntimeError is correct
    d56d83a Fix references to methods not defined on Object but on Kernel.
    
    git-subtree-dir: spec/ruby
    git-subtree-split: 19ff31914df0f1e653c53d0909ae300382c2b60a
    eregon committed Mar 24, 2015
    Copy the full SHA
    4eaa190 View commit details
  3. Copy the full SHA
    767c13b View commit details
  4. Copy the full SHA
    f75b331 View commit details
  5. [Truffle] Make it clearer we use System.identityHashCode() in Kernel#…

    …hash.
    
    * There are no more custom hashCode() methods in RubyBasicObject and subclasses.
    eregon committed Mar 24, 2015
    Copy the full SHA
    79a7d3d View commit details
  6. Copy the full SHA
    25966fe View commit details
  7. Copy the full SHA
    dc696aa View commit details
  8. Copy the full SHA
    a7bfa0d View commit details
  9. Merge branch 'jruby-1_7'

    Fixes #2751
    
    Conflicts:
    	core/src/main/java/org/jruby/RubyGlobal.java
    	core/src/main/java/org/jruby/ext/bigdecimal/RubyBigDecimal.java
    	test/test_big_decimal.rb
    	test/test_bignum.rb
    enebo committed Mar 24, 2015
    Copy the full SHA
    732db64 View commit details
  10. Squashed 'spec/mspec/' changes from 48dbdc3..6676cd6

    6676cd6 Show tagged stats by default.
    3ac8bc4 Update the extension of the README in the gemspec.
    76fedea Restrict RSpec to version 2.x, excluding 2.99.
    32841bb Travis: do not depend on a specific jdk.
    
    git-subtree-dir: spec/mspec
    git-subtree-split: 6676cd6ad6d65590fe9e92e12062fb10bdccce5e
    eregon committed Mar 24, 2015
    Copy the full SHA
    197f5eb View commit details
  11. Copy the full SHA
    b6b5c3c View commit details
  12. Merge pull request #2747 from bjfish/truffle_array_zip_again

    [Truffle] Updating Array#zip to handle more specs in array.rb
    chrisseaton committed Mar 24, 2015
    Copy the full SHA
    254f3c2 View commit details
  13. [Truffle] Process.times

    chrisseaton committed Mar 24, 2015
    Copy the full SHA
    72536b3 View commit details

Commits on Mar 25, 2015

  1. Copy the full SHA
    052e0d0 View commit details
  2. Copy the full SHA
    c7bc8f3 View commit details
  3. Merge pull request #2755 from bjfish/truffle_array_insert

    [Truffle] Updating Array#insert to pass additional specs.
    chrisseaton committed Mar 25, 2015
    Copy the full SHA
    3855ace View commit details
  4. Copy the full SHA
    37e9d84 View commit details
  5. avoid regression in loading Java classes with upper case package names (

    fixes #2742)
    
    ... caused by the internal cleanup (the regression is not part of any 1.7.x release)
    
    one can only test this with *-Xji.upper.case.package.name.allowed=true* but since there's another failure the feature introduces, this will need to be revisited
    kares committed Mar 25, 2015
    Copy the full SHA
    f4ff889 View commit details
  6. use 'new' CallableSelector methods (with IntHashMap cache) for better…

    … performance
    
    + make the internals do less casting by making private methods type generic
    
    ... also made some of the callable concrete classes final
    kares committed Mar 25, 2015
    Copy the full SHA
    805ccb8 View commit details
  7. cleanup JavaUtil - use implicit primitive boxing (instead of explicit…

    …) + less array[i] access
    kares committed Mar 25, 2015
    Copy the full SHA
    ce714cd View commit details
  8. Copy the full SHA
    765fee8 View commit details
  9. Copy the full SHA
    b390857 View commit details
  10. Copy the full SHA
    7bf94dd View commit details
  11. Copy the full SHA
    58487dd View commit details
  12. Copy the full SHA
    250976c View commit details
  13. cleanup JavaProxyConstructor - share invocation handler + no fixnums …

    …on arg conversion
    
    ... also added getJavaProxyConstructor onto JavaSupport - so there's less lookup going on
    kares committed Mar 25, 2015
    Copy the full SHA
    f22aed3 View commit details
  14. Copy the full SHA
    5a7501f View commit details
  15. extract another (in-line) invocation handler impl into an inner stati…

    …c class + better naming
    kares committed Mar 25, 2015
    Copy the full SHA
    dbc7954 View commit details
  16. test (and fix) inspect / to_s for Java callables + share inspectParam…

    …eterTypes for re-use
    kares committed Mar 25, 2015
    Copy the full SHA
    530f72b View commit details
  17. JavaClass - share more internals and test some of the method/construc…

    …tor reflection
    
    ... also avoided ArrayIndexOutOfBoundException since we checked args.length late
    kares committed Mar 25, 2015
    Copy the full SHA
    c80f1c4 View commit details
  18. Copy the full SHA
    b7dbefe View commit details
  19. Copy the full SHA
    97e391c View commit details
  20. Copy the full SHA
    84fa6b7 View commit details
  21. Copy the full SHA
    dab9159 View commit details
  22. Copy the full SHA
    eb8f62e View commit details
  23. Copy the full SHA
    8cb2b3c View commit details
  24. Copy the full SHA
    9318c35 View commit details
  25. Copy the full SHA
    a4585eb View commit details
  26. [Truffle] Use a flag for detecting when we are loading core - as we d…

    …on't always have access to the true node.
    chrisseaton committed Mar 25, 2015
    Copy the full SHA
    e54c5c9 View commit details
  27. 6
    Copy the full SHA
    dcd8fba View commit details
  28. Copy the full SHA
    7dc2c98 View commit details
  29. Copy the full SHA
    577ffbc View commit details
  30. Copy the full SHA
    d507e49 View commit details
  31. Copy the full SHA
    84054a5 View commit details
  32. Merge pull request #2758 from bjfish/truffle_array_uniq

    [Truffle] Implementing more of Array#{uniq,uniq!}
    chrisseaton committed Mar 25, 2015
    Copy the full SHA
    ab4be7b View commit details

Commits on Mar 26, 2015

  1. Copy the full SHA
    8361137 View commit details
  2. Copy the full SHA
    ed54a08 View commit details
  3. Copy the full SHA
    18f91f7 View commit details
  4. as (most) Java invokers will not have overrides - they won't use the …

    …internal cache
    
    ... for loading up JRuby's built-in JI classes this saves up allocating > 2100 maps
    
    also we shall now use "more-compact" short term garbage (array[] list) chunks
    kares committed Mar 26, 2015
    Copy the full SHA
    8cdb5ec View commit details
Showing 679 changed files with 19,034 additions and 24,215 deletions.
6 changes: 4 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -90,7 +90,8 @@
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-enxio</artifactId>
<version>0.7</version>
<version>0.8-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
@@ -100,7 +101,8 @@
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-unixsocket</artifactId>
<version>0.6</version>
<version>0.7-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/RubyGlobal.java
Original file line number Diff line number Diff line change
@@ -124,7 +124,6 @@ public static void createGlobals(ThreadContext context, Ruby runtime) {
runtime.defineGlobalConstant("RUBY_PATCHLEVEL", patchlevel);
runtime.defineGlobalConstant("RUBY_RELEASE_DATE", release);
runtime.defineGlobalConstant("RUBY_PLATFORM", platform);
runtime.defineGlobalConstant("RUBY_ENGINE", engine);

IRubyObject description = runtime.newString(OutputStrings.getVersionString()).freeze(context);
runtime.defineGlobalConstant("RUBY_DESCRIPTION", description);
@@ -142,6 +141,8 @@ public static void createGlobals(ThreadContext context, Ruby runtime) {

// needs to be a fixnum, but our revision is a sha1 hash from git
runtime.defineGlobalConstant("RUBY_REVISION", runtime.newFixnum(Constants.RUBY_REVISION));
runtime.defineGlobalConstant("RUBY_ENGINE", engine);
runtime.defineGlobalConstant("RUBY_ENGINE_VERSION", jrubyVersion);

RubyInstanceConfig.Verbosity verbosity = runtime.getInstanceConfig().getVerbosity();
runtime.defineVariable(new WarningGlobalVariable(runtime, "$-W", verbosity), GLOBAL);
82 changes: 7 additions & 75 deletions core/src/main/java/org/jruby/RubyString.java
Original file line number Diff line number Diff line change
@@ -2154,12 +2154,12 @@ public boolean isEmpty() {
*/
public RubyString append(IRubyObject other) {
if (other instanceof RubyFixnum) {
cat(ConvertBytes.longToByteList(((RubyFixnum)other).getLongValue()));
cat(ConvertBytes.longToByteList(((RubyFixnum) other).getLongValue()));
return this;
} else if (other instanceof RubyFloat) {
return cat((RubyString)((RubyFloat)other).to_s());
return cat((RubyString) ((RubyFloat) other).to_s());
} else if (other instanceof RubySymbol) {
cat(((RubySymbol)other).getBytes());
cat(((RubySymbol) other).getBytes());
return this;
}
RubyString otherStr = other.convertToString();
@@ -2261,6 +2261,9 @@ public RubyString crypt(ThreadContext context, IRubyObject other) {
POSIX posix = context.runtime.getPosix();
byte[] keyBytes = Arrays.copyOfRange(value.unsafeBytes(), value.begin(), value.realSize());
byte[] saltBytes = Arrays.copyOfRange(otherBL.unsafeBytes(), otherBL.begin(), otherBL.realSize());
if (saltBytes[0] == 0 || saltBytes[1] == 0) {
throw context.runtime.newArgumentError("salt too short(need >=2 bytes)");
}
byte[] cryptedString = posix.crypt(keyBytes, saltBytes);
// We differ from MRI in that we do not process salt to make it work and we will
// return any errors via errno.
@@ -3838,6 +3841,7 @@ private static void setMatchString(RubyMatchData match, RubyString string, int p
match.begin = pos;
match.end = pos + len;
match.charOffsetUpdated = false;
match.regs = null;
match.infectBy(string);
}

@@ -3851,78 +3855,6 @@ private static void setBackrefString(ThreadContext context, RubyString string, i
context.setBackRef(match);
}

private IRubyObject scanIter19(ThreadContext context, Regex pattern, Regex prepared, Encoding enc, Block block, RubyRegexp regexp, int tuFlags) {
Ruby runtime = context.runtime;
byte[]bytes = value.getUnsafeBytes();
int begin = value.getBegin();
int len = value.getRealSize();
int range = begin + len;
final Matcher matcher = prepared.matcher(bytes, begin, range);

int end = 0;
RubyMatchData match = null;
if (pattern.numberOfCaptures() == 0) {
while (RubyRegexp.matcherSearch(runtime, matcher, begin + end, range, Option.NONE) >= 0) {
end = StringSupport.positionEndForScan(value, matcher, enc, begin, range);
match = RubyRegexp.createMatchData19(context, this, matcher, pattern);
match.regexp = regexp;
RubyString substr = makeShared19(runtime, matcher.getBegin(), matcher.getEnd() - matcher.getBegin());
substr.infectBy(tuFlags);
match.infectBy(tuFlags);
context.setBackRef(match);
block.yield(context, substr);
modifyCheck(bytes, len, enc);
}
} else {
while (RubyRegexp.matcherSearch(runtime, matcher, begin + end, range, Option.NONE) >= 0) {
end = StringSupport.positionEndForScan(value, matcher, enc, begin, range);
match = RubyRegexp.createMatchData19(context, this, matcher, pattern);
match.regexp = regexp;
match.infectBy(tuFlags);
context.setBackRef(match);
block.yield(context, populateCapturesForScan(runtime, matcher, range, tuFlags, true));
modifyCheck(bytes, len, enc);
}
}
context.setBackRef(match == null ? runtime.getNil() : match);
return this;
}

private IRubyObject scanNoIter19(ThreadContext context, Regex pattern, Regex prepared, Encoding enc, RubyRegexp regexp, int tuFlags) {
Ruby runtime = context.runtime;
byte[]bytes = value.getUnsafeBytes();
int begin = value.getBegin();
int range = begin + value.getRealSize();
final Matcher matcher = prepared.matcher(bytes, begin, range);

RubyArray ary = runtime.newArray();

int end = 0;
if (pattern.numberOfCaptures() == 0) {
while (RubyRegexp.matcherSearch(runtime, matcher, begin + end, range, Option.NONE) >= 0) {
end = StringSupport.positionEndForScan(value, matcher, enc, begin, range);
RubyString substr = makeShared19(runtime, matcher.getBegin(), matcher.getEnd() - matcher.getBegin());
substr.infectBy(tuFlags);
ary.append(substr);
}
} else {
while (RubyRegexp.matcherSearch(runtime, matcher, begin + end, range, Option.NONE) >= 0) {
end = StringSupport.positionEndForScan(value, matcher, enc, begin, range);
ary.append(populateCapturesForScan(runtime, matcher, range, tuFlags, true));
}
}

if (ary.size() > 0) {
RubyMatchData match = RubyRegexp.createMatchData19(context, this, matcher, pattern);
match.regexp = regexp;
match.infectBy(tuFlags);
context.setBackRef(match);
} else {
context.setBackRef(runtime.getNil());
}
return ary;
}

@JRubyMethod(name = "start_with?")
public IRubyObject start_with_p(ThreadContext context) {
return context.runtime.getFalse();
31 changes: 31 additions & 0 deletions core/src/main/java/org/jruby/ext/ripper/ArgsTailHolder.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.jruby.ext.ripper;

import org.jruby.runtime.builtin.IRubyObject;

/**
* Simple struct to temporarily hold values during part of parsing.
*/
public class ArgsTailHolder {
private final IRubyObject keywordArgs;
private final IRubyObject keywordRestArg;
private final IRubyObject blockArg;

public ArgsTailHolder(IRubyObject keywordArgs, IRubyObject keywordRestArg, IRubyObject blockArg) {
this.keywordArgs = keywordArgs;
this.keywordRestArg = keywordRestArg;
this.blockArg = blockArg;

}

public IRubyObject getBlockArg() {
return blockArg;
}

public IRubyObject getKeywordArgs() {
return keywordArgs;
}

public IRubyObject getKeywordRestArg() {
return keywordRestArg;
}
}
5 changes: 4 additions & 1 deletion core/src/main/java/org/jruby/ext/ripper/HeredocTerm.java
Original file line number Diff line number Diff line change
@@ -139,7 +139,10 @@ public int parseString(RipperLexer lexer, LexerSource src) throws java.io.IOExce
if (pend < lexer.lex_pend) str.append('\n');
lexer.lex_goto_eol();
if (lexer.nextc() == -1) {
if (str != null) return error(lexer, len, str, eos);
if (str != null) {
str = null;
return error(lexer, len, str, eos);
}
}
} while(!lexer.whole_match_p(eos, indent));
} else {
Loading