Skip to content

Commit

Permalink
Merge branch 'master' into truffle-head
Browse files Browse the repository at this point in the history
Conflicts:
	truffle/src/main/java/org/jruby/truffle/nodes/core/ThreadNodes.java
  • Loading branch information
chrisseaton committed Apr 24, 2015
2 parents 00fbf5a + 081148a commit 8f883f5
Show file tree
Hide file tree
Showing 172 changed files with 2,500 additions and 443 deletions.
2 changes: 1 addition & 1 deletion core/pom.rb
Expand Up @@ -46,7 +46,7 @@
jar 'com.github.jnr:jnr-unixsocket:0.7'
jar 'com.github.jnr:jnr-posix:3.0.11'
jar 'com.github.jnr:jnr-constants:0.8.6'
jar 'com.github.jnr:jnr-ffi:2.0.2'
jar 'com.github.jnr:jnr-ffi:2.0.3-SNAPSHOT'
jar 'com.github.jnr:jffi:${jffi.version}'
jar 'com.github.jnr:jffi:${jffi.version}:native'

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Expand Up @@ -115,7 +115,7 @@
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-ffi</artifactId>
<version>2.0.2</version>
<version>2.0.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
Expand Down
15 changes: 15 additions & 0 deletions core/src/main/java/org/jruby/Ruby.java
Expand Up @@ -167,6 +167,7 @@
import java.io.PrintWriter;
import java.lang.ref.WeakReference;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.net.BindException;
import java.net.MalformedURLException;
import java.net.URL;
Expand Down Expand Up @@ -1287,6 +1288,20 @@ && getInstanceConfig().getCompileMode() != CompileMode.TRUFFLE) {
loadService.require("jruby");
}

// attempt to enable unlimited-strength crypto on OpenJDK
try {
Class jceSecurity = Class.forName("javax.crypto.JceSecurity");
Field isRestricted = jceSecurity.getField("isRestricted");
isRestricted.setAccessible(true);
isRestricted.set(null, false);
isRestricted.setAccessible(false);
} catch (Exception e) {
if (isDebug()) {
System.err.println("unable to enable unlimited-strength crypto");
e.printStackTrace();
}
}

// out of base boot mode
bootingCore = false;

Expand Down
7 changes: 3 additions & 4 deletions core/src/main/java/org/jruby/util/ShellLauncher.java
Expand Up @@ -757,7 +757,7 @@ private static Process popenShared(Ruby runtime, IRubyObject[] strings) throws I
}

private static Process popenShared(Ruby runtime, IRubyObject[] strings, Map env) throws IOException {
return popenShared(runtime, strings, env, false);
return popenShared(runtime, strings, env, true);
}

private static Process popenShared(Ruby runtime, IRubyObject[] strings, Map env, boolean addShell) throws IOException {
Expand All @@ -783,10 +783,9 @@ private static Process popenShared(Ruby runtime, IRubyObject[] strings, Map env,

String[] args = parseCommandLine(runtime.getCurrentContext(), runtime, strings);
LaunchConfig lc = new LaunchConfig(runtime, strings, false);
boolean useShell = lc.shouldRunInShell();
boolean useShell = Platform.IS_WINDOWS ? lc.shouldRunInShell() : false;
if (addShell) for (String arg : args) useShell |= shouldUseShell(arg);

// CON: popen is a case where I think we should just always shell out.

if (strings.length == 1) {
if (useShell) {
// single string command, pass to sh to expand wildcards
Expand Down
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb.rb
@@ -0,0 +1 @@
require_relative '../../stdlib/irb'
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/cmd/chws.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/cmd/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/cmd/fork.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/cmd/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/cmd/help.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/cmd/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/cmd/load.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/cmd/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/cmd/nop.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/cmd/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/cmd/pushws.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/cmd/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/cmd/subirb.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/cmd/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/completion.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/context.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ext/change-ws.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/ext/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ext/history.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/ext/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ext/loader.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/ext/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ext/math-mode.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/ext/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ext/multi-irb.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/ext/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ext/save-history.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/ext/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ext/tracer.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/ext/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ext/use-loader.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/ext/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ext/workspaces.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/ext/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/extend-command.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/frame.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/help.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/init.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/input-method.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/inspector.rb