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

Commits on Jul 27, 2015

  1. Copy the full SHA
    57f8e76 View commit details
  2. Copy the full SHA
    016b529 View commit details
  3. Add tags for new specs.

    eregon committed Jul 27, 2015
    Copy the full SHA
    5033a92 View commit details
  4. Copy the full SHA
    a3cfa20 View commit details
2 changes: 1 addition & 1 deletion spec/ruby/shared/process/exit.rb
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@
end

describe :process_exit!, :shared => true do
platform_is_not :windows do
with_feature :fork do
it "exits with the given status" do
pid = Process.fork { @object.exit!(1) }
pid, status = Process.waitpid2(pid)
1 change: 1 addition & 0 deletions spec/tags/ruby/core/array/equal_value_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Array#== compares with an equivalent Array-like object using #to_ary
1 change: 1 addition & 0 deletions spec/tags/ruby/core/string/slice_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:String#slice! with index calls to_int on index
1 change: 1 addition & 0 deletions spec/tags/ruby/core/thread/priority_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Thread#priority= sets priority even when the thread has died
32 changes: 14 additions & 18 deletions truffle/src/main/java/org/jruby/truffle/nodes/core/ModuleNodes.java
Original file line number Diff line number Diff line change
@@ -1727,20 +1727,18 @@ public RubyBasicObject instanceMethod(RubyBasicObject module, String name) {
@CoreMethod(names = "private_constant", argumentsAsArray = true)
public abstract static class PrivateConstantNode extends CoreMethodArrayArgumentsNode {

@Child NameToJavaStringNode nameToJavaStringNode;

public PrivateConstantNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
this.nameToJavaStringNode = NameToJavaStringNodeGen.create(context, sourceSection, null);
}

@Specialization
public RubyBasicObject privateConstant(RubyBasicObject module, Object[] args) {
CompilerDirectives.transferToInterpreter();

for (Object name : args) {
if (RubyGuards.isRubySymbol(name)) {
getModel(module).changeConstantVisibility(this, SymbolNodes.getString((RubyBasicObject) name), true);
} else {
throw new UnsupportedOperationException();
}
public RubyBasicObject privateConstant(VirtualFrame frame, RubyBasicObject module, Object[] args) {
for (Object arg : args) {
String name = nameToJavaStringNode.executeToJavaString(frame, arg);
getModel(module).changeConstantVisibility(this, name, true);
}
return module;
}
@@ -1749,20 +1747,18 @@ public RubyBasicObject privateConstant(RubyBasicObject module, Object[] args) {
@CoreMethod(names = "public_constant", argumentsAsArray = true)
public abstract static class PublicConstantNode extends CoreMethodArrayArgumentsNode {

@Child NameToJavaStringNode nameToJavaStringNode;

public PublicConstantNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
this.nameToJavaStringNode = NameToJavaStringNodeGen.create(context, sourceSection, null);
}

@Specialization
public RubyBasicObject publicConstant(RubyBasicObject module, Object[] args) {
CompilerDirectives.transferToInterpreter();

for (Object name : args) {
if (RubyGuards.isRubySymbol(name)) {
getModel(module).changeConstantVisibility(this, SymbolNodes.getString((RubyBasicObject) name), false);
} else {
throw new UnsupportedOperationException();
}
public RubyBasicObject publicConstant(VirtualFrame frame, RubyBasicObject module, Object[] args) {
for (Object arg : args) {
String name = nameToJavaStringNode.executeToJavaString(frame, arg);
getModel(module).changeConstantVisibility(this, name, false);
}
return module;
}
Original file line number Diff line number Diff line change
@@ -89,8 +89,8 @@ public int getPriority(RubyBasicObject thread, int rubyPriority) {
final Thread javaThread = ThreadNodes.getFields(thread).thread;
if (javaThread != null) {
javaThread.setPriority(javaPriority);
ThreadNodes.getFields(thread).priority = rubyPriority;
}
ThreadNodes.getFields(thread).priority = rubyPriority;
return rubyPriority;
}
}