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
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/lc/error.rb
@@ -0,0 +1 @@
require_relative '../../../../stdlib/irb/lc/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/lc/ja/encoding_aliases.rb
@@ -0,0 +1 @@
require_relative '../../../../../stdlib/irb/lc/ja' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/lc/ja/error.rb
@@ -0,0 +1 @@
require_relative '../../../../../stdlib/irb/lc/ja' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/locale.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/magic-file.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/notifier.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/output-method.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ruby-lex.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ruby-token.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/slex.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/src_encoding.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/version.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/workspace.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/ws-for-case-2.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/irb/xmp.rb
@@ -0,0 +1 @@
require_relative '../../../stdlib/irb/' + File.basename(__FILE__)
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/scanf.rb
@@ -0,0 +1 @@
require_relative '../../stdlib/scanf'
1 change: 1 addition & 0 deletions lib/ruby/truffle/rubysl/README.md
Expand Up @@ -10,3 +10,4 @@ Commits for each library are:
* rubysl-complex `ccdb6e86aed5eaada64808f85d03d08d2834294a`
* rubysl-pathname `cdf215804c4349353a60226b5c1d71f695d45570`
* rubysl-tempfile `97c4464b4d235f773aab537fbc80608a730a58fc`
* rubysl-socket `3a8c965b36643208da81360ddb4ca7ba867cd3c4`
25 changes: 25 additions & 0 deletions lib/ruby/truffle/rubysl/rubysl-socket/LICENSE
@@ -0,0 +1,25 @@
Copyright (c) 2013, Brian Shirai
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the library nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 comments on commit 8f883f5

Please sign in to comment.