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

Commits on Dec 3, 2014

  1. Copy the full SHA
    276b5f6 View commit details
  2. Copy the full SHA
    f309f0f View commit details
  3. Copy the full SHA
    2f9f898 View commit details

Commits on Dec 4, 2014

  1. Copy the full SHA
    9f8b6a5 View commit details
  2. crypt specs are bogus. tagging until they can be removed. readlink on…

    …es need investigation and must be fallout from updating jnr
    enebo committed Dec 4, 2014
    Copy the full SHA
    67d9cac View commit details
  3. Don't code angry or tired

    enebo committed Dec 4, 2014
    Copy the full SHA
    1aa8c87 View commit details
  4. refactor FileResource.inputStream to be easier to use

    for any client code which needs to convert a uri-like path to an inputstream
    the way to go is ```JRubyFile.create(runtime, path).inputStream()```
    mkristian committed Dec 4, 2014
    Copy the full SHA
    57c2513 View commit details
  5. See if newlines makes that tag work. Less unbreak bizarreness of cryp…

    …t with non-ascii encoded strings passed to something expecting clean 8bit strings
    enebo committed Dec 4, 2014
    Copy the full SHA
    729acbf View commit details
  6. Copy the full SHA
    1721b25 View commit details
  7. Fails not fail?

    enebo committed Dec 4, 2014
    Copy the full SHA
    82cfe56 View commit details
  8. Have mspec always wipe out rubyspec_temp before begging so it does no…

    …t pick up old files. Untagged passing specs
    enebo committed Dec 4, 2014
    Copy the full SHA
    92c0796 View commit details
  9. Copy the full SHA
    a46ce8e View commit details
  10. Clean up imports.

    headius committed Dec 4, 2014
    Copy the full SHA
    43051c5 View commit details

Commits on Dec 5, 2014

  1. Copy the full SHA
    5a4bcb2 View commit details
  2. Copy the full SHA
    7407560 View commit details
  3. Typo.

    headius committed Dec 5, 2014
    Copy the full SHA
    9982637 View commit details
  4. rexml patch

    enebo committed Dec 5, 2014
    Copy the full SHA
    d569253 View commit details
  5. Make JarredScript attempt to load associated service library if neces…

    …sary.
    Dmitry Ratnikov committed Dec 5, 2014
    Copy the full SHA
    ae1a055 View commit details
  6. Similar fix to test as:

    Dmitry Ratnikov committed Dec 5, 2014
    Copy the full SHA
    79e9cc6 View commit details

Commits on Dec 6, 2014

  1. Merge pull request #2281 from ratnikov/fix-2055

    Make loading service extensions work with classloader path
    mkristian committed Dec 6, 2014
    Copy the full SHA
    1ff2d5a View commit details
  2. Merge pull request #2282 from ratnikov/fix-2222

    Fix jar loading test in test/test_file.rb
    mkristian committed Dec 6, 2014
    Copy the full SHA
    8c41ab6 View commit details
  3. redefine uri:classloader: meaning to be the parent classloader of run…

    …time.getJRubyClassLoader
    
    this allows to set JRubyHome to uri:classloader:/META-INF/jruby.home for all situations where
    there is a jruby.home packed inside a jar.
    
    fixes problem with loadService and knoplerfish OSGi
    
    fixed missed test and cleanup javadocs and add more junit-tests for uri:classloader:
    
    make IsolatedScriptingContainer work on felix-4.2.1 and probably on other osgi frameworks outside the pax test cases
    mkristian committed Dec 6, 2014
    Copy the full SHA
    f5b9462 View commit details
  4. add testcase for the case where jruby.home is inside a jar but not on…

    … the context-classloader
    mkristian committed Dec 6, 2014
    Copy the full SHA
    b04987a View commit details
  5. Merge pull request #2278 from jruby/redefine-uri-classloader-meaning

    Redefine uri classloader meaning
    mkristian committed Dec 6, 2014
    Copy the full SHA
    1eedf72 View commit details

Commits on Dec 8, 2014

  1. Copy the full SHA
    91bc487 View commit details
  2. Echo $HOME on Travis.

    headius committed Dec 8, 2014
    Copy the full SHA
    945fcbd View commit details
  3. Copy the full SHA
    a4ead5a View commit details
  4. Copy the full SHA
    2e15a98 View commit details
  5. Copy the full SHA
    ef5e72e View commit details
  6. Copy the full SHA
    4da392f View commit details
  7. Bump for new version

    enebo committed Dec 8, 2014
    Copy the full SHA
    084d55e View commit details

Commits on Dec 9, 2014

  1. Copy the full SHA
    fafd1a7 View commit details

Commits on Dec 10, 2014

  1. Copy the full SHA
    97c4b15 View commit details
  2. Copy the full SHA
    b3e9f2f View commit details
  3. [build] bump version

    mkristian committed Dec 10, 2014
    Copy the full SHA
    be211f1 View commit details
  4. Copy the full SHA
    38436e7 View commit details
  5. Copy the full SHA
    07e801b View commit details
  6. fix File.executable? when native is disabled

    use the new canExecute method from the FileResource to answer the question.
    for File#executable_real? use posix if native is available. also added
    tests for executable? as well for executable_real?. fixes #2297
    
    Sponsored by Lookout Inc.
    mkristian committed Dec 10, 2014
    Copy the full SHA
    663fb14 View commit details
  7. Copy the full SHA
    b5ce6b9 View commit details
  8. Copy the full SHA
    2f56d95 View commit details
  9. Fixes #2048

    enebo committed Dec 10, 2014
    Copy the full SHA
    00e8c00 View commit details
  10. remove test_adding_pem_to_x509store

    put it back when we switch to next jruby-openssl version
    mkristian committed Dec 10, 2014
    Copy the full SHA
    f7082b3 View commit details
  11. Copy the full SHA
    986bd8d View commit details
  12. Copy the full SHA
    307b859 View commit details
  13. Copy the full SHA
    6776f0b View commit details
  14. Copy the full SHA
    4c3fa76 View commit details
  15. Copy the full SHA
    29ff03d View commit details
  16. Copy the full SHA
    ac491ee View commit details
  17. Update to RubyGems 2.4.5.

    headius committed Dec 10, 2014
    Copy the full SHA
    e9f5e96 View commit details
  18. Copy the full SHA
    5276ce0 View commit details
Showing with 649 additions and 652 deletions.
  1. +5 −5 antlib/extra.xml
  2. +3 −3 core/pom.rb
  3. +3 −3 core/pom.xml
  4. +2 −1 core/src/main/java/org/jruby/Ruby.java
  5. +1 −1 core/src/main/java/org/jruby/RubyClass.java
  6. +25 −4 core/src/main/java/org/jruby/RubyFile.java
  7. +1 −1 core/src/main/java/org/jruby/RubyFileStat.java
  8. +8 −5 core/src/main/java/org/jruby/RubyFileTest.java
  9. +137 −135 core/src/main/java/org/jruby/RubyString.java
  10. +37 −8 core/src/main/java/org/jruby/ast/SymbolNode.java
  11. +11 −11 core/src/main/java/org/jruby/ast/executable/AbstractScript.java
  12. +7 −2 core/src/main/java/org/jruby/ast/executable/RuntimeCache.java
  13. +5 −10 core/src/main/java/org/jruby/common/RubyWarnings.java
  14. +20 −40 core/src/main/java/org/jruby/embed/IsolatedScriptingContainer.java
  15. +15 −1 core/src/main/java/org/jruby/embed/internal/EmbedRubyRuntimeAdapterImpl.java
  16. +1 −1 core/src/main/java/org/jruby/ext/tempfile/Tempfile.java
  17. +12 −5 core/src/main/java/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java
  18. +9 −1 core/src/main/java/org/jruby/runtime/load/JarredScript.java
  19. +9 −5 core/src/main/java/org/jruby/runtime/load/LibrarySearcher.java
  20. +30 −17 core/src/main/java/org/jruby/runtime/load/LoadService.java
  21. +36 −0 core/src/main/java/org/jruby/util/AbstractFileResource.java
  22. +3 −7 core/src/main/java/org/jruby/util/ClasspathResource.java
  23. +12 −2 core/src/main/java/org/jruby/util/EmptyFileResource.java
  24. +14 −5 core/src/main/java/org/jruby/util/FileResource.java
  25. +6 −2 core/src/main/java/org/jruby/util/JRubyFile.java
  26. +3 −2 core/src/main/java/org/jruby/util/JarDirectoryResource.java
  27. +3 −2 core/src/main/java/org/jruby/util/JarFileResource.java
  28. +1 −2 core/src/main/java/org/jruby/util/JarResource.java
  29. +12 −7 core/src/main/java/org/jruby/util/RegularFileResource.java
  30. +8 −0 core/src/main/java/org/jruby/util/ShellLauncher.java
  31. +39 −45 core/src/main/java/org/jruby/util/URLResource.java
  32. +0 −235 core/src/main/java/org/jruby/util/string/JavaCrypt.java
  33. +7 −0 core/src/test/java/org/jruby/embed/ScriptingContainerTest.java
  34. +52 −8 core/src/test/java/org/jruby/util/URLResourceTest.java
  35. +1 −0 core/src/test/ruby/__FILE__.rb
  36. +0 −10 default.build.properties
  37. +1 −1 ivy/ivy.xml
  38. +1 −5 lib/ruby/stdlib/rubygems/dependency_list.rb
  39. +1 −1 lib/ruby/stdlib/rubygems/indexer.rb
  40. +9 −3 lib/ruby/stdlib/rubygems/package/tar_writer.rb
  41. +5 −7 ...y_bundles_with_embedded_gems/test/src/test/java/org/jruby/embed/osgi/test/JRubyOsgiEmbedTest.java
  42. +0 −10 maven/jruby-complete/src/templates/osgi_many_bundles_with_embedded_gems/verify.bsh
  43. +1 −1 maven/jruby-jars/.gitignore
  44. +2 −2 maven/jruby-jars/jruby-jars.gemspec
  45. +0 −4 maven/jruby-jars/lib/jruby-jars/version.rb
  46. +22 −0 maven/jruby/src/it/many_jars_with_embedded_gems_ng/app/src/test/java/org/example/SimpleTest.java
  47. +6 −7 .../src/templates/osgi_all_inclusive/src/test/java/org/jruby/embed/osgi/test/JRubyOsgiEmbedTest.java
  48. +3 −3 maven/pom.rb
  49. +1 −0 maven/pom.xml
  50. +1 −0 rakelib/commands.rake
  51. +21 −0 spec/regression/GH-1941_loaded_features_does_not_expand_symlinks_spec.rb
  52. +7 −0 spec/regression/GH-2259_file_basename_must_preserve_encoding_spec.rb
  53. +10 −0 spec/regression/GH-2298_capture3_accepts_trailing_options_spec.rb
  54. +2 −0 spec/tags/1.8/ruby/core/string/crypt_tags.txt
  55. +1 −0 spec/tags/1.9/ruby/core/string/crypt_tags.txt
  56. +0 −2 spec/tags/ruby/core/symbol/versions/encoding_1.9_tags.txt
  57. +17 −1 test/jruby/test_file.rb
  58. +0 −19 test/test_adding_pem_to_x509store.rb
10 changes: 5 additions & 5 deletions antlib/extra.xml
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ build jruby-complete.jar
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
<arg value='-cp'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.17-SNAPSHOT.jar'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.18-SNAPSHOT.jar'/>
<arg value='org.jruby.Main'/>
<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>
<arg value='-r./test/ruby19_env.rb'/>
@@ -136,7 +136,7 @@ build jruby-complete.jar
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
<arg value='-cp'/>
<arg value='core/target/test-classes:test/target/test-classes:maven/jruby-complete/target/jruby-complete-1.7.17-SNAPSHOT.jar'/>
<arg value='core/target/test-classes:test/target/test-classes:maven/jruby-complete/target/jruby-complete-1.7.18-SNAPSHOT.jar'/>
<arg value='org.jruby.Main'/>
<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>
<arg value='-r./test/ruby19_env.rb'/>
@@ -152,7 +152,7 @@ build jruby-complete.jar
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
<arg value='-cp'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.17-SNAPSHOT.jar'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.18-SNAPSHOT.jar'/>
<arg value='org.jruby.Main'/>
<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>
<arg value='-r./test/ruby19_env.rb'/>
@@ -168,7 +168,7 @@ build jruby-complete.jar
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
<arg value='-cp'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.17-SNAPSHOT.jar'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.18-SNAPSHOT.jar'/>
<arg value='org.jruby.Main'/>
<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>
<arg value='-r./test/ruby19_env.rb'/>
@@ -460,7 +460,7 @@ build jruby-complete.jar
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
<arg value='-cp'/>
<arg value='core/target/test-classes:test/target/test-classes:maven/jruby-complete/target/jruby-complete-1.7.17-SNAPSHOT.jar'/>
<arg value='core/target/test-classes:test/target/test-classes:maven/jruby-complete/target/jruby-complete-1.7.18-SNAPSHOT.jar'/>
<arg value='org.jruby.Main'/>
<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>
<arg value='-r./test/ruby19_env.rb'/>
6 changes: 3 additions & 3 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -35,8 +35,8 @@
jar 'com.github.jnr:jnr-enxio:0.4'
jar 'com.github.jnr:jnr-x86asm:1.0.2'
jar 'com.github.jnr:jnr-unixsocket:0.3'
jar 'com.github.jnr:jnr-posix:3.0.7'
jar 'com.github.jnr:jnr-constants:0.8.6-SNAPSHOT'
jar 'com.github.jnr:jnr-posix:3.0.8'
jar 'com.github.jnr:jnr-constants:0.8.6'
jar 'com.github.jnr:jnr-ffi:2.0.0'
jar 'com.github.jnr:jffi:${jffi.version}'
jar 'com.github.jnr:jffi:${jffi.version}:native'
@@ -45,7 +45,7 @@
jar 'org.jruby.extras:bytelist:1.0.12'
jar 'org.jruby.jcodings:jcodings:1.0.12'

jar 'com.headius:invokebinder:1.5-SNAPSHOT'
jar 'com.headius:invokebinder:1.5'
jar 'com.headius:options:1.1'
jar 'com.headius:coro-mock:1.0', :scope => 'provided'
jar 'com.headius:unsafe-mock', '${unsafe.version}', :scope => 'provided'
6 changes: 3 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -71,12 +71,12 @@
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-posix</artifactId>
<version>3.0.7</version>
<version>3.0.8</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-constants</artifactId>
<version>0.8.6-SNAPSHOT</version>
<version>0.8.6</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
@@ -112,7 +112,7 @@
<dependency>
<groupId>com.headius</groupId>
<artifactId>invokebinder</artifactId>
<version>1.5-SNAPSHOT</version>
<version>1.5</version>
</dependency>
<dependency>
<groupId>com.headius</groupId>
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -161,6 +161,7 @@
import java.security.AccessControlException;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumMap;
import java.util.EnumSet;
import java.util.HashMap;
@@ -3037,7 +3038,7 @@ public synchronized void addEventHook(EventHook hook) {
}

EventHook[] hooks = eventHooks;
EventHook[] newHooks = new EventHook[hooks.length + 1];
EventHook[] newHooks = Arrays.copyOf(hooks, hooks.length + 1);
newHooks[hooks.length] = hook;
eventHooks = newHooks;
hasEventHooks = true;
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyClass.java
Original file line number Diff line number Diff line change
@@ -675,7 +675,7 @@ public static boolean checkFuncallCallable(ThreadContext context, DynamicMethod
// MRI: rb_method_call_status
// FIXME: Partial impl because we don't have these "NOEX" flags
public static boolean rbMethodCallStatus(ThreadContext context, DynamicMethod method, CallType callType, IRubyObject self) {
return !method.isUndefined() && method.isCallableFrom(self, callType);
return method != null && !method.isUndefined() && method.isCallableFrom(self, callType);
}

private static IRubyObject checkFuncallMissing(ThreadContext context, RubyClass klass, IRubyObject self, String method, IRubyObject... args) {
29 changes: 25 additions & 4 deletions core/src/main/java/org/jruby/RubyFile.java
Original file line number Diff line number Diff line change
@@ -42,6 +42,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URL;
import java.nio.channels.Channels;
@@ -502,16 +503,28 @@ public IRubyObject inspect() {

@JRubyMethod(required = 1, optional = 1, meta = true)
public static IRubyObject basename(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
String name = get_path(context,args[0]).getUnicodeValue();
Ruby runtime = context.runtime;

RubyString origString = get_path(context,args[0]);
Encoding origEncoding = origString.getEncoding();
String name = origString.toString();

// MRI-compatible basename handling for windows drive letter paths
if (Platform.IS_WINDOWS) {
if (name.length() > 1 && name.charAt(1) == ':' && Character.isLetter(name.charAt(0))) {
switch (name.length()) {
case 2:
return RubyString.newEmptyString(context.runtime).infectBy(args[0]);
return RubyString.newEmptyString(runtime, origString.getEncoding()).infectBy(args[0]);
case 3:
return context.runtime.newString(name.substring(2)).infectBy(args[0]);
if (origEncoding.getCharset() != null) {
try {
return RubyString.newString(runtime, new ByteList(name.substring(2).getBytes(origEncoding.getCharsetName()), origString.getEncoding())).infectBy(args[0]);
} catch (UnsupportedEncodingException uee) {
// fall through to UTF-8 logic
}
}

return RubyString.newString(runtime, name.substring(2)).infectBy(args[0]);
default:
switch (name.charAt(2)) {
case '/':
@@ -566,7 +579,15 @@ public static IRubyObject basename(ThreadContext context, IRubyObject recv, IRub
name = name.substring(0, name.length() - ext.length());
}
}
return context.runtime.newString(name).infectBy(args[0]);
if (origEncoding.getCharset() != null) {
try {
return RubyString.newString(runtime, new ByteList(name.getBytes(origEncoding.getCharsetName()), origString.getEncoding())).infectBy(args[0]);
} catch (UnsupportedEncodingException uee) {
// fall through to UTF-8 logic
}
}

return RubyString.newString(runtime, name).infectBy(args[0]);
}

@JRubyMethod(required = 2, rest = true, meta = true)
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyFileStat.java
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@ private void setup(String filename, boolean lstat) {
file = JRubyFile.createResource(runtime.getPosix(), runtime.getCurrentDirectory(), filename);
stat = lstat ? file.lstat() : file.stat();

if (stat == null) throw runtime.newErrnoFromInt(runtime.getPosix().errno(), filename);
if (stat == null) throw runtime.newErrnoFromInt(file.errno(), filename);
}

public IRubyObject initialize(IRubyObject fname, Block unusedBlock) {
13 changes: 8 additions & 5 deletions core/src/main/java/org/jruby/RubyFileTest.java
Original file line number Diff line number Diff line change
@@ -97,16 +97,19 @@ public static IRubyObject directory_p(ThreadContext context, IRubyObject filenam

@JRubyMethod(name = "executable?", required = 1, module = true)
public static IRubyObject executable_p(IRubyObject recv, IRubyObject filename) {
FileStat stat = fileResource(filename).stat();

return recv.getRuntime().newBoolean(stat != null && stat.isExecutable());
return recv.getRuntime().newBoolean(fileResource(filename).canExecute());
}

@JRubyMethod(name = "executable_real?", required = 1, module = true)
public static IRubyObject executable_real_p(IRubyObject recv, IRubyObject filename) {
FileStat stat = fileResource(filename).stat();
if (recv.getRuntime().getPosix().isNative()) {
FileStat stat = fileResource(filename).stat();

return recv.getRuntime().newBoolean(stat != null && stat.isExecutableReal());
return recv.getRuntime().newBoolean(stat != null && stat.isExecutableReal());
}
else {
return executable_p(recv, filename);
}
}

public static IRubyObject exist_p(IRubyObject recv, IRubyObject filename) {
Loading