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: d6489ff76cfa
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: eda033a5e2d7
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Jun 21, 2016

  1. Copy the full SHA
    32ed526 View commit details
  2. Copy the full SHA
    eda033a View commit details
24 changes: 14 additions & 10 deletions core/src/main/java/org/jruby/RubyInstanceConfig.java
Original file line number Diff line number Diff line change
@@ -165,21 +165,25 @@ public void processArguments(String[] arguments) {

public void tryProcessArgumentsWithRubyopts() {
try {
// environment defaults to System.getenv normally
Object rubyoptObj = environment.get("RUBYOPT");
String rubyopt = rubyoptObj == null ? null : rubyoptObj.toString();

if (rubyopt == null || rubyopt.length() == 0) return;

String[] rubyoptArgs = rubyopt.split("\\s+");
if (rubyoptArgs.length != 0) {
new ArgumentProcessor(rubyoptArgs, false, true, true, this).processArguments();
}
processArgumentsWithRubyopts();
} catch (SecurityException se) {
// ignore and do nothing
}
}

public void processArgumentsWithRubyopts() {
// environment defaults to System.getenv normally
Object rubyoptObj = environment.get("RUBYOPT");
String rubyopt = rubyoptObj == null ? null : rubyoptObj.toString();

if (rubyopt == null || rubyopt.length() == 0) return;

String[] rubyoptArgs = rubyopt.split("\\s+");
if (rubyoptArgs.length != 0) {
new ArgumentProcessor(rubyoptArgs, false, true, true, this).processArguments();
}
}

// This method does not work like previous version in verifying it is
// a Ruby shebang line. Looking for ruby before \n is possible to add,
// but I wanted to keep this short.
1 change: 1 addition & 0 deletions truffle/src/main/java/org/jruby/truffle/RubyLanguage.java
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@ public RubyContext createContext(Env env) {

if (runtimeWrapper == null) {
RubyInstanceConfig config = new RubyInstanceConfig();
config.processArgumentsWithRubyopts();
config.setCompileMode(RubyInstanceConfig.CompileMode.TRUFFLE);
runtime = Ruby.newInstance(config);
} else {
2 changes: 0 additions & 2 deletions truffle/src/main/ruby/core/shims.rb
Original file line number Diff line number Diff line change
@@ -271,5 +271,3 @@ def when_splat(cases, expression)
c === expression
end
end

Truffle::Interop.export(:ruby_cext, Truffle::CExt)
2 changes: 2 additions & 0 deletions truffle/src/main/ruby/core/truffle/cext.rb
Original file line number Diff line number Diff line change
@@ -180,3 +180,5 @@ def rb_undef(mod, name)
end
end
end

Truffle::Interop.export(:ruby_cext, Truffle::CExt)