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

Commits on Oct 31, 2016

  1. Copy the full SHA
    a2ac5e3 View commit details
  2. 1
    Copy the full SHA
    579a710 View commit details
2 changes: 1 addition & 1 deletion spec/truffle/tags/core/process/set_proctitle_tags.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fails:Process.setproctitle should set the process title
linux:Process.setproctitle should set the process title
2 changes: 1 addition & 1 deletion tool/jt.rb
Original file line number Diff line number Diff line change
@@ -1011,7 +1011,7 @@ def test_bundle(*args)
if gem.has_key?(:commit)
raw_sh(*['git', 'checkout', gem[:commit]])
end
run({'GEM_HOME' => gem_home}, *["-rbundler-workarounds", "-S", "gem", "install", "bundler", "-v","1.12.5"])
run({'GEM_HOME' => gem_home}, *["-rbundler-workarounds", "-S", "gem", "install", "bundler", "-v","1.13.5"])
run({'GEM_HOME' => gem_home}, *["-rbundler-workarounds", "-S", "bundle", "install"])
# Need to workaround ruby_install name `jruby-truffle` in the gems binstubs (command can't be found )
# or figure out how to get it on the path to get `bundle exec rake` working
16 changes: 16 additions & 0 deletions truffle/src/main/java/org/jruby/truffle/core/VMPrimitiveNodes.java
Original file line number Diff line number Diff line change
@@ -597,4 +597,20 @@ public DynamicObject setClass(DynamicObject object, DynamicObject newClass) {

}

@Primitive(name = "vm_set_process_title", needsSelf = false)
public abstract static class VMSetProcessTitleNode extends PrimitiveArrayArgumentsNode {

@TruffleBoundary
@Specialization(guards = "isRubyString(name)")
protected Object writeProgramName(DynamicObject name) {
if (getContext().getNativePlatform().getProcessName().canSet()) {
getContext().getNativePlatform().getProcessName().set(name.toString());
}

return name;
}

}


}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@
import org.jruby.truffle.core.IsNilNode;
import org.jruby.truffle.core.IsRubiniusUndefinedNode;
import org.jruby.truffle.core.RaiseIfFrozenNode;
import org.jruby.truffle.core.VMPrimitiveNodesFactory;
import org.jruby.truffle.core.array.ArrayAppendOneNodeGen;
import org.jruby.truffle.core.array.ArrayConcatNode;
import org.jruby.truffle.core.array.ArrayDropTailNode;
@@ -112,7 +113,6 @@
import org.jruby.truffle.language.globals.UpdateLastBacktraceNode;
import org.jruby.truffle.language.globals.UpdateVerbosityNode;
import org.jruby.truffle.language.globals.WriteGlobalVariableNodeGen;
import org.jruby.truffle.language.globals.WriteProgramNameNodeGen;
import org.jruby.truffle.language.globals.WriteReadOnlyGlobalNode;
import org.jruby.truffle.language.literal.BooleanLiteralNode;
import org.jruby.truffle.language.literal.FloatLiteralNode;
@@ -1731,7 +1731,8 @@ public RubyNode visitGlobalAsgnNode(GlobalAsgnParseNode node) {
final RubyNode translated;

if (name.equals("$0")) {
translated = WriteProgramNameNodeGen.create(context, fullSourceSection, writeGlobalVariableNode);
translated = VMPrimitiveNodesFactory.VMSetProcessTitleNodeFactory.create(
new RubyNode[]{ writeGlobalVariableNode });
} else {
translated = writeGlobalVariableNode;
}
2 changes: 1 addition & 1 deletion truffle/src/main/ruby/core/process.rb
Original file line number Diff line number Diff line change
@@ -126,7 +126,7 @@ def self.cpu_times
#
def self.setproctitle(title)
val = Rubinius::Type.coerce_to(title, String, :to_str)
$0 = val
Truffle.invoke_primitive(:vm_set_process_title, val)
end

def self.setrlimit(resource, cur_limit, max_limit=undefined)