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

Commits on Mar 9, 2015

  1. Copy the full SHA
    46b0907 View commit details
  2. Copy the full SHA
    07c294d View commit details
  3. Copy the full SHA
    f93a4b6 View commit details
  4. Copy the full SHA
    dd42647 View commit details
  5. Copy the full SHA
    ca97f24 View commit details
Showing with 59 additions and 156 deletions.
  1. +1 −0 lib/ruby/truffle/mri/tsort.rb
  2. +0 −3 spec/truffle/tags/core/kernel/__method___tags.txt
  3. +0 −3 spec/truffle/tags/core/module/protected_instance_methods_tags.txt
  4. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/classify_tags.txt
  5. +0 −3 spec/truffle/tags/rubysl/rubysl-set/spec/collect_tags.txt
  6. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/constructor_tags.txt
  7. +0 −4 spec/truffle/tags/rubysl/rubysl-set/spec/delete_if_tags.txt
  8. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/difference_tags.txt
  9. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/divide_tags.txt
  10. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/each_tags.txt
  11. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/enumerable/to_set_tags.txt
  12. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/eql_tags.txt
  13. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/equal_value_tags.txt
  14. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/exclusion_tags.txt
  15. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/flatten_merge_tags.txt
  16. +0 −4 spec/truffle/tags/rubysl/rubysl-set/spec/flatten_tags.txt
  17. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/hash_tags.txt
  18. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/initialize_tags.txt
  19. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/inspect_tags.txt
  20. +0 −4 spec/truffle/tags/rubysl/rubysl-set/spec/keep_if_tags.txt
  21. +0 −3 spec/truffle/tags/rubysl/rubysl-set/spec/map_tags.txt
  22. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/merge_tags.txt
  23. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/minus_tags.txt
  24. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/plus_tags.txt
  25. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/pretty_print_tags.txt
  26. +0 −5 spec/truffle/tags/rubysl/rubysl-set/spec/reject_tags.txt
  27. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/replace_tags.txt
  28. +0 −5 spec/truffle/tags/rubysl/rubysl-set/spec/select_tags.txt
  29. +0 −6 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/add_tags.txt
  30. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/append_tags.txt
  31. +0 −3 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/classify_tags.txt
  32. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/clear_tags.txt
  33. +0 −3 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/collect_tags.txt
  34. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/constructor_tags.txt
  35. +0 −4 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/delete_if_tags.txt
  36. +0 −5 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/delete_tags.txt
  37. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/difference_tags.txt
  38. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/divide_tags.txt
  39. +0 −3 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/each_tags.txt
  40. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/empty_tags.txt
  41. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/eql_tags.txt
  42. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/equal_value_tags.txt
  43. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/exclusion_tags.txt
  44. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/flatten_merge_tags.txt
  45. +0 −4 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/flatten_tags.txt
  46. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/hash_tags.txt
  47. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/include_tags.txt
  48. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/initialize_copy_tags.txt
  49. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/initialize_tags.txt
  50. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/inspect_tags.txt
  51. +0 −4 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/intersection_tags.txt
  52. +0 −4 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/keep_if_tags.txt
  53. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/length_tags.txt
  54. +0 −3 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/map_tags.txt
  55. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/member_tags.txt
  56. +0 −3 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/merge_tags.txt
  57. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/minus_tags.txt
  58. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/plus_tags.txt
  59. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/pretty_print_cycle_tags.txt
  60. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/pretty_print_tags.txt
  61. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/proper_subset_tags.txt
  62. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/proper_superset_tags.txt
  63. +0 −5 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/reject_tags.txt
  64. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/replace_tags.txt
  65. +0 −5 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/select_tags.txt
  66. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/size_tags.txt
  67. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/subset_tags.txt
  68. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/subtract_tags.txt
  69. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/superset_tags.txt
  70. +0 −1 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/to_a_tags.txt
  71. +0 −4 spec/truffle/tags/rubysl/rubysl-set/spec/sortedset/union_tags.txt
  72. +0 −2 spec/truffle/tags/rubysl/rubysl-set/spec/union_tags.txt
  73. +20 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java
  74. +38 −0 truffle/src/main/java/org/jruby/truffle/nodes/core/ModuleNodes.java
1 change: 1 addition & 0 deletions lib/ruby/truffle/mri/tsort.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require_relative '../../stdlib/tsort'
3 changes: 0 additions & 3 deletions spec/truffle/tags/core/kernel/__method___tags.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
fails:Kernel.__method__ returns the current method, even when aliased
fails:Kernel.__method__ returns the original name when aliased method
fails:Kernel.__method__ returns the caller from blocks too
fails:Kernel.__method__ returns the caller from define_method too
fails:Kernel.__method__ returns the caller from block inside define_method too
fails:Kernel.__method__ returns method name even from eval
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
fails:Module#protected_instance_methods returns a list of protected methods in module and its ancestors
fails:Module#protected_instance_methods when passed false as a parameter, should return only methods defined in that module
fails:Module#protected_instance_methods default list should be the same as passing true as an argument
fails:Module#protected_instance_methods when not passed an argument returns a unique list for a class including a module
fails:Module#protected_instance_methods when not passed an argument returns a unique list for a subclass
fails:Module#protected_instance_methods when passed true returns a unique list for a class including a module
fails:Module#protected_instance_methods when passed true returns a unique list for a subclass
1 change: 0 additions & 1 deletion spec/truffle/tags/rubysl/rubysl-set/spec/classify_tags.txt

This file was deleted.

3 changes: 0 additions & 3 deletions spec/truffle/tags/rubysl/rubysl-set/spec/collect_tags.txt

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions spec/truffle/tags/rubysl/rubysl-set/spec/delete_if_tags.txt

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/rubysl/rubysl-set/spec/divide_tags.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
fails:Set#divide divides self into a set of subsets based on the blocks return values
fails:Set#divide yields each Object to the block
fails:Set#divide when passed a block with an arity of 2 divides self into a set of subsets based on the blocks return values
fails:Set#divide when passed a block with an arity of 2 yields each two Object to the block
1 change: 0 additions & 1 deletion spec/truffle/tags/rubysl/rubysl-set/spec/each_tags.txt

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/rubysl/rubysl-set/spec/eql_tags.txt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions spec/truffle/tags/rubysl/rubysl-set/spec/flatten_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/rubysl/rubysl-set/spec/hash_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/rubysl/rubysl-set/spec/initialize_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/rubysl/rubysl-set/spec/inspect_tags.txt

This file was deleted.

4 changes: 0 additions & 4 deletions spec/truffle/tags/rubysl/rubysl-set/spec/keep_if_tags.txt

This file was deleted.

3 changes: 0 additions & 3 deletions spec/truffle/tags/rubysl/rubysl-set/spec/map_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/rubysl/rubysl-set/spec/merge_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/rubysl/rubysl-set/spec/minus_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/rubysl/rubysl-set/spec/plus_tags.txt

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions spec/truffle/tags/rubysl/rubysl-set/spec/reject_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/rubysl/rubysl-set/spec/replace_tags.txt

This file was deleted.

5 changes: 0 additions & 5 deletions spec/truffle/tags/rubysl/rubysl-set/spec/select_tags.txt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
fails:SortedSet#divide divides self into a set of subsets based on the blocks return values
fails:SortedSet#divide yields each Object in self in sorted order
fails:SortedSet#divide when passed a block with an arity of 2 divides self into a set of subsets based on the blocks return values
fails:SortedSet#divide when passed a block with an arity of 2 yields each two Objects to the block

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
fails:SortedSet#initialize_copy is private
fails:SortedSet#initialize_copy replaces all elements of self with the elements of the passed SortedSet

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/rubysl/rubysl-set/spec/union_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -217,7 +217,7 @@ public abstract static class CompareNode extends CoreMethodNode {

public CompareNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
equalNode = SameOrEqualNodeFactory.create(context, sourceSection, new RubyNode[] { null, null });
equalNode = SameOrEqualNodeFactory.create(context, sourceSection, new RubyNode[]{null, null});
}

public CompareNode(CompareNode prev) {
@@ -1264,6 +1264,25 @@ public Object loop(VirtualFrame frame) {
}
}

@CoreMethod(names = "__method__", needsSelf = false)
public abstract static class MethodNameNode extends CoreMethodNode {

public MethodNameNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

public MethodNameNode(MethodNameNode prev) {
super(prev);
}

@Specialization
public RubySymbol methodName(VirtualFrame frame) {
notDesignedForCompilation();
return getContext().getSymbolTable().getSymbol(RubyCallStack.getCallingMethod(frame).getSharedMethodInfo().getName());
}

}

@CoreMethod(names = "method", required = 1)
public abstract static class MethodNode extends CoreMethodNode {

Original file line number Diff line number Diff line change
@@ -1361,6 +1361,44 @@ public RubyModule privateClassMethod(RubyModule module, Object... args) {
}
}

@CoreMethod(names = "protected_instance_methods", optional = 1)
public abstract static class ProtectedInstanceMethodsNode extends CoreMethodNode {

public ProtectedInstanceMethodsNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

public ProtectedInstanceMethodsNode(ProtectedInstanceMethodsNode prev) {
super(prev);
}

@Specialization
public RubyArray protectedInstanceMethods(RubyModule module, UndefinedPlaceholder argument) {
return protectedInstanceMethods(module, false);
}

@Specialization
public RubyArray protectedInstanceMethods(RubyModule module, boolean includeAncestors) {
notDesignedForCompilation();

final RubyArray array = new RubyArray(getContext().getCoreLibrary().getArrayClass());
final List<InternalMethod> methods = new ArrayList<>(module.getMethods().values());

if (includeAncestors) {
for (RubyModule parent : module.parentAncestors()) {
methods.addAll(parent.getMethods().values());
}
}
for (InternalMethod method : methods) {
if (method.getVisibility() == Visibility.PROTECTED){
RubySymbol m = getContext().newSymbol(method.getName());
array.slowPush(m);
}
}
return array;
}
}

@CoreMethod(names = "private_instance_methods", optional = 1)
public abstract static class PrivateInstanceMethodsNode extends CoreMethodNode {