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: 320f656d25bb
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c28f4cec7751
Choose a head ref
  • 16 commits
  • 45 files changed
  • 5 contributors

Commits on Apr 26, 2015

  1. Copy the full SHA
    3e6a636 View commit details

Commits on Apr 28, 2015

  1. Merge pull request #2870 from bjfish/truffle_mri_travis

    [Truffle] Add MRI tests to Travis builds and update the jt tool.
    chrisseaton committed Apr 28, 2015
    Copy the full SHA
    d434ae5 View commit details
  2. Copy the full SHA
    a5d291d View commit details
  3. Copy the full SHA
    96f075a View commit details

Commits on Apr 29, 2015

  1. Copy the full SHA
    146856d View commit details
  2. 2
    Copy the full SHA
    5a83ff7 View commit details
  3. Copy the full SHA
    cedad15 View commit details
  4. Copy the full SHA
    a7f4542 View commit details
  5. Improve NameError names to align with MRI. Fixes #2869.

    This is not exactly the same as MRI but it's not too bad for a few
    additional one-off fixes.
    
    There are few (or maybe no) specs in RubySpec and only a handful
    in MRI testing what NameError should be in various cases; TBD.
    headius committed Apr 29, 2015
    Copy the full SHA
    e937702 View commit details
  6. putting the jruby-classloader as context classloader means that all a…

    …ttached "jars" can be found via
    
    the Thread.currentThread.contextClassLoader. running jruby from other environments like servlets just
    leave the context classloader as is. so this was a commandline only feature.
    
    finally it keeps the classloader semantic uniform wether executed from commandline or inside a j2ee container
    or osgi framework or embedded jruby in a java application
    mkristian committed Apr 29, 2015
    3
    Copy the full SHA
    ff10216 View commit details
  7. back to SNAPSHOT version

    mkristian committed Apr 29, 2015
    Copy the full SHA
    83767d5 View commit details
  8. Copy the full SHA
    804986d View commit details
  9. Copy the full SHA
    cca7c7e View commit details
  10. Copy the full SHA
    edec82e View commit details
  11. Merge branch 'master' into truffle-head

    Conflicts:
    	truffle/src/main/java/org/jruby/truffle/nodes/core/BignumNodes.java
    chrisseaton committed Apr 29, 2015
    Copy the full SHA
    33fb8c5 View commit details
  12. [Truffle] Update to 0.7

    chrisseaton committed Apr 29, 2015
    Copy the full SHA
    c28f4ce View commit details
Showing with 236 additions and 208 deletions.
  1. +1 −0 .travis.yml
  2. +1 −1 VERSION
  3. +1 −1 core/pom.xml
  4. +0 −14 core/src/main/java/org/jruby/Main.java
  5. +18 −7 core/src/main/java/org/jruby/RubyModule.java
  6. +1 −1 core/src/main/java/org/jruby/util/cli/ArgumentProcessor.java
  7. +2 −2 lib/pom.xml
  8. +0 −100 lib/ruby/shared/ffi/platform/ppc64le-linux/types.conf
  9. +1 −0 lib/ruby/truffle/mri/logger.rb
  10. +1 −1 maven/jruby-complete/pom.xml
  11. +1 −1 maven/jruby-dist/pom.xml
  12. +3 −4 maven/jruby-jars/pom.xml
  13. +1 −1 maven/jruby/pom.xml
  14. +1 −1 maven/pom.xml
  15. +1 −1 pom.xml
  16. +4 −2 spec/java_integration/reify/become_java_spec.rb
  17. +0 −2 spec/truffle/tags/core/bignum/equal_value_tags.txt
  18. +1 −0 spec/truffle/tags/library/logger/device/close_tags.txt
  19. +1 −0 spec/truffle/tags/library/logger/device/new_tags.txt
  20. +2 −0 spec/truffle/tags/library/logger/device/write_tags.txt
  21. +2 −0 spec/truffle/tags/library/logger/logger/new_tags.txt
  22. +2 −0 spec/truffle/tags/library/stringscanner/element_reference_tags.txt
  23. +1 −0 spec/truffle/tags/library/stringscanner/getch_tags.txt
  24. +1 −0 spec/truffle/tags/library/stringscanner/matched_tags.txt
  25. +1 −0 spec/truffle/tags/library/stringscanner/peek_tags.txt
  26. +1 −0 spec/truffle/tags/library/stringscanner/peep_tags.txt
  27. +1 −0 spec/truffle/tags/library/stringscanner/post_match_tags.txt
  28. +1 −0 spec/truffle/tags/library/stringscanner/scan_tags.txt
  29. +1 −0 spec/truffle/tags/library/stringscanner/scan_until_tags.txt
  30. +2 −3 spec/truffle/truffle.mspec
  31. +1 −4 test/jruby/test_context_classloader.rb
  32. +2 −0 test/mri/excludes_truffle/CGICookieTest.rb
  33. +2 −0 test/mri/excludes_truffle/CGIHeaderTest.rb
  34. +9 −0 test/mri/excludes_truffle/CGIMultipartTest.rb
  35. +2 −0 test/mri/excludes_truffle/CGITagHelperTest.rb
  36. +4 −0 test/mri/excludes_truffle/CGIUtilTest.rb
  37. +1 −0 test/mri/excludes_truffle/TestBasicInstructions.rb
  38. +46 −0 test/mri/excludes_truffle/TestSyntax.rb
  39. +13 −13 test/mri_truffle.index
  40. +3 −12 test/pom.xml
  41. +48 −31 tool/jt.rb
  42. +8 −2 truffle/pom.rb
  43. +15 −3 truffle/pom.xml
  44. +23 −0 truffle/src/main/java/org/jruby/truffle/nodes/core/BignumNodes.java
  45. +5 −1 truffle/src/main/java/org/jruby/truffle/translator/LoadArgumentsTranslator.java
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -41,6 +41,7 @@ env:
- PHASE='-Ptruffle-specs-language'
- PHASE='-Ptruffle-specs-core'
- PHASE='-Ptruffle-specs-library'
- PHASE='-Ptruffle-mri-tests'

matrix:
include:
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.0.0.0.pre2
9.0.0.0-SNAPSHOT
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-parent</artifactId>
<version>9.0.0.0.pre2</version>
<version>9.0.0.0-SNAPSHOT</version>
</parent>
<artifactId>jruby-core</artifactId>
<name>JRuby Core</name>
14 changes: 0 additions & 14 deletions core/src/main/java/org/jruby/Main.java
Original file line number Diff line number Diff line change
@@ -283,8 +283,6 @@ public void run() {
}

try {
doSetContextClassLoader(runtime);

if (in == null) {
// no script to run, return success
return new Status();
@@ -454,18 +452,6 @@ private boolean checkStreamSyntax(Ruby runtime, InputStream in, String filename)
}
}

private void doSetContextClassLoader(Ruby runtime) {
// set thread context JRuby classloader here, for the main thread
try {
Thread.currentThread().setContextClassLoader(runtime.getJRubyClassLoader());
} catch (SecurityException se) {
// can't set TC classloader
if (runtime.getInstanceConfig().isVerbose()) {
config.getError().println("WARNING: Security restrictions disallowed setting context classloader for main thread.");
}
}
}

private void doProcessArguments(InputStream in) {
config.processArguments(config.parseShebangOptions(in));
}
25 changes: 18 additions & 7 deletions core/src/main/java/org/jruby/RubyModule.java
Original file line number Diff line number Diff line change
@@ -2985,18 +2985,25 @@ public RubyBoolean const_defined_p19(ThreadContext context, IRubyObject[] args)
String symbol = fullName;
boolean inherit = args.length == 1 || (!args[1].isNil() && args[1].isTrue());

int sep = symbol.indexOf("::");
// symbol form does not allow ::
if (args[0] instanceof RubySymbol && symbol.indexOf("::") != -1) {
if (args[0] instanceof RubySymbol && sep != -1) {
throw runtime.newNameError("wrong constant name", symbol);
}

RubyModule mod = this;

if (symbol.startsWith("::")) mod = runtime.getObject();
if (sep == 0) { // ::Foo::Bar
mod = runtime.getObject();
symbol = symbol.substring(2);
}

// Bare ::
if (symbol.length() == 0) throw context.runtime.newNameError("wrong constant name ::", fullName);

int sep;
while((sep = symbol.indexOf("::")) != -1) {
String segment = symbol.substring(0, sep);
if (segment.length() == 0) throw context.runtime.newNameError("wrong constant name " + fullName, symbol);
symbol = symbol.substring(sep + 2);
IRubyObject obj = mod.getConstantNoConstMissing(validateConstant(segment, args[0]), inherit, inherit);
if(obj instanceof RubyModule) {
@@ -3040,6 +3047,9 @@ public IRubyObject const_get_2_0(ThreadContext context, IRubyObject[] args) {
symbol = symbol.substring(2);
}

// Bare ::
if (symbol.length() == 0) throw context.runtime.newNameError("wrong constant name ::", fullName);

while ((sep = symbol.indexOf("::")) != -1) {
String segment = symbol.substring(0, sep);
symbol = symbol.substring(sep + 2);
@@ -3107,15 +3117,16 @@ private boolean hasConstantInHierarchy(final String name) {
@JRubyMethod(name = "const_missing", required = 1)
public IRubyObject const_missing(ThreadContext context, IRubyObject rubyName, Block block) {
Ruby runtime = context.runtime;
String name;
String shortName = rubyName.asJavaString();
String longName;

if (this != runtime.getObject()) {
name = getName() + "::" + rubyName.asJavaString();
longName = getName() + "::" + shortName;
} else {
name = rubyName.asJavaString();
longName = shortName;
}

throw runtime.newNameErrorObject("uninitialized constant " + name, runtime.newSymbol(name));
throw runtime.newNameErrorObject("uninitialized constant " + longName, runtime.newSymbol(shortName));
}

public RubyArray constants(ThreadContext context) {
Original file line number Diff line number Diff line change
@@ -718,7 +718,7 @@ private void logScriptResolutionFailure(String path) {
public static void checkGraalVersion() {
if (Options.TRUFFLE_RUNTIME_VERSION_CHECK.load()) {
final String graalVersion = System.getProperty("graal.version", "unknown");
final String expectedGraalVersion = "0.7-dev";
final String expectedGraalVersion = "0.7";

if (graalVersion.equals("unknown")) {
return;
4 changes: 2 additions & 2 deletions lib/pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-parent</artifactId>
<version>9.0.0.0.pre2</version>
<version>9.0.0.0-SNAPSHOT</version>
</parent>
<artifactId>jruby-stdlib</artifactId>
<name>JRuby Lib Setup</name>
@@ -22,7 +22,7 @@
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-core</artifactId>
<version>9.0.0.0.pre2</version>
<version>9.0.0.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
100 changes: 0 additions & 100 deletions lib/ruby/shared/ffi/platform/ppc64le-linux/types.conf

This file was deleted.

1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/logger.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require_relative '../../stdlib/logger'
2 changes: 1 addition & 1 deletion maven/jruby-complete/pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-artifacts</artifactId>
<version>9.0.0.0.pre2</version>
<version>9.0.0.0-SNAPSHOT</version>
</parent>
<artifactId>jruby-complete</artifactId>
<packaging>bundle</packaging>
2 changes: 1 addition & 1 deletion maven/jruby-dist/pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-artifacts</artifactId>
<version>9.0.0.0.pre2</version>
<version>9.0.0.0-SNAPSHOT</version>
</parent>
<artifactId>jruby-dist</artifactId>
<packaging>pom</packaging>
7 changes: 3 additions & 4 deletions maven/jruby-jars/pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-artifacts</artifactId>
<version>9.0.0.0.pre2</version>
<version>9.0.0.0-SNAPSHOT</version>
</parent>
<groupId>rubygems</groupId>
<artifactId>jruby-jars</artifactId>
@@ -43,7 +43,6 @@ freezing to) a specific jruby-complete jar version.</description>
<url>http://github.com/jruby/jruby/tree/master/gem/jruby-jars</url>
</scm>
<properties>
<jruby.home>${basedir}/../..</jruby.home>
<tesla.dump.readonly>true</tesla.dump.readonly>
<gem.home>${jruby_home}/lib/ruby/gems/shared</gem.home>
<jruby.plugins.version>1.0.7</jruby.plugins.version>
@@ -73,7 +72,7 @@ freezing to) a specific jruby-complete jar version.</description>
</extension>
</extensions>
<directory>${basedir}/pkg</directory>
<finalName>${project.artifactId}-9.0.0.0.pre2</finalName>
<finalName>${project.artifactId}-9.0.0.0.SNAPSHOT</finalName>
<plugins>
<plugin>
<groupId>de.saumya.mojo</groupId>
@@ -120,7 +119,7 @@ freezing to) a specific jruby-complete jar version.</description>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<properties>
<ruby.version>9.0.0.0.pre2</ruby.version>
<ruby.version>9.0.0.0.SNAPSHOT</ruby.version>
<gem.home>${project.build.directory}/rubygems</gem.home>
<gem.path>${project.build.directory}/rubygems</gem.path>
</properties>
2 changes: 1 addition & 1 deletion maven/jruby/pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-artifacts</artifactId>
<version>9.0.0.0.pre2</version>
<version>9.0.0.0-SNAPSHOT</version>
</parent>
<artifactId>jruby</artifactId>
<name>JRuby Main Maven Artifact</name>
2 changes: 1 addition & 1 deletion maven/pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-parent</artifactId>
<version>9.0.0.0.pre2</version>
<version>9.0.0.0-SNAPSHOT</version>
</parent>
<artifactId>jruby-artifacts</artifactId>
<packaging>pom</packaging>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
</parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-parent</artifactId>
<version>9.0.0.0.pre2</version>
<version>9.0.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JRuby</name>
<description>JRuby is the effort to recreate the Ruby (http://www.ruby-lang.org) interpreter in Java.</description>
6 changes: 4 additions & 2 deletions spec/java_integration/reify/become_java_spec.rb
Original file line number Diff line number Diff line change
@@ -112,8 +112,10 @@ def blah_with_args(arg_one,arg_two)
class JRUBY5564; end
a_class = JRUBY5564.become_java!(false)

# load the java class from the classloader
cl = java.lang.Thread.current_thread.getContextClassLoader
# load the java class from the jruby-classloader
# this diverts from the original issue 5564 since
# JRuby can run without any context_class_loader involved
cl = JRuby.runtime.jruby_class_loader
cl.load_class(a_class.get_name).should == a_class
end

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/bignum/equal_value_tags.txt

This file was deleted.

1 change: 1 addition & 0 deletions spec/truffle/tags/library/logger/device/close_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Logger::LogDevice#close closes the LogDevice's stream
1 change: 1 addition & 0 deletions spec/truffle/tags/library/logger/device/new_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Logger::LogDevice#new creates a File if the IO object does not exist
2 changes: 2 additions & 0 deletions spec/truffle/tags/library/logger/device/write_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fails:Logger::LogDevice#write can create a file and writes empty message
fails:Logger::LogDevice#write fails if the device is already closed
2 changes: 2 additions & 0 deletions spec/truffle/tags/library/logger/logger/new_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fails:Logger#new creates a new logger object
fails:Logger#new receivs a maximum logfile size as third argument
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fails:StringScanner#[] raises a IndexError when there's no named capture
fails:StringScanner#[] returns named capture
1 change: 1 addition & 0 deletions spec/truffle/tags/library/stringscanner/getch_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:StringScanner#getch is multi-byte character sensitive
1 change: 1 addition & 0 deletions spec/truffle/tags/library/stringscanner/matched_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:StringScanner#matched taints the returned String if the input was tainted
1 change: 1 addition & 0 deletions spec/truffle/tags/library/stringscanner/peek_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:StringScanner#peek raises a RangeError when the passed argument is a Bignum
1 change: 1 addition & 0 deletions spec/truffle/tags/library/stringscanner/peep_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:StringScanner#peep raises a RangeError when the passed argument is a Bignum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:StringScanner#post_match taints the returned String if the input was tainted
1 change: 1 addition & 0 deletions spec/truffle/tags/library/stringscanner/scan_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:StringScanner#scan treats ^ as matching from the beginning of the current position
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:StringScanner#scan_until can match anchors properly
5 changes: 2 additions & 3 deletions spec/truffle/truffle.mspec
Original file line number Diff line number Diff line change
@@ -90,6 +90,7 @@ class MSpecScript
"spec/ruby/library/erb",
"spec/ruby/library/getoptlong",
"spec/ruby/library/matrix",
"spec/ruby/library/logger",
"spec/ruby/library/observer",
"spec/ruby/library/open3",
"spec/ruby/library/openstruct",
@@ -100,7 +101,7 @@ class MSpecScript
"spec/ruby/library/shellwords",
"spec/ruby/library/singleton",
"spec/ruby/library/stringio",
"spec/ruby/library/strscan",
"spec/ruby/library/stringscanner",
"spec/ruby/library/tempfile",
"spec/ruby/library/thread",
"spec/ruby/library/time",
@@ -117,15 +118,13 @@ class MSpecScript
"^spec/ruby/library/expect",
"^spec/ruby/library/fiber",
"^spec/ruby/library/ipaddr",
"^spec/ruby/library/logger",
"^spec/ruby/library/mathn",
"^spec/ruby/library/net",
"^spec/ruby/library/openssl",
"^spec/ruby/library/readline",
"^spec/ruby/library/resolv",
"^spec/ruby/library/rexml",
"^spec/ruby/library/securerandom",
"^spec/ruby/library/stringscanner",
"^spec/ruby/library/syslog",
"^spec/ruby/library/timeout",
"^spec/ruby/library/weakref",
Loading