Skip to content

Commit fe48a1f

Browse files
committed
[Truffle] Remove prettyprint shims and import real code.
1 parent 88d03a9 commit fe48a1f

File tree

4 files changed

+2
-32
lines changed

4 files changed

+2
-32
lines changed

core/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,33 +1379,6 @@ public ObjectIDNode(ObjectIDNode prev) {
13791379

13801380
}
13811381

1382-
/*
1383-
* Kernel#pretty_inspect is normally part of stdlib, in pp.rb, but we aren't able to execute
1384-
* that file yet. Instead we implement a very simple version here, which is the solution
1385-
* suggested by RubySpec.
1386-
*/
1387-
1388-
@CoreMethod(names = "pretty_inspect")
1389-
public abstract static class PrettyInspectNode extends CoreMethodNode {
1390-
1391-
@Child protected DispatchHeadNode inspectNode;
1392-
1393-
public PrettyInspectNode(RubyContext context, SourceSection sourceSection) {
1394-
super(context, sourceSection);
1395-
inspectNode = DispatchHeadNode.onSelf(context);
1396-
}
1397-
1398-
public PrettyInspectNode(PrettyInspectNode prev) {
1399-
super(prev);
1400-
inspectNode = prev.inspectNode;
1401-
}
1402-
1403-
@Specialization
1404-
public Object prettyInspect(VirtualFrame frame, Object self) {
1405-
return inspectNode.call(frame, self, "inspect", null);
1406-
}
1407-
}
1408-
14091382
@CoreMethod(names = "print", isModuleFunction = true, argumentsAsArray = true)
14101383
public abstract static class PrintNode extends CoreMethodNode {
14111384

core/src/main/java/org/jruby/truffle/runtime/subsystems/FeatureManager.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ public boolean require(String path, String feature, RubyNode currentNode) throws
6262
return true;
6363
}
6464

65-
if (feature.equals("pp")) {
66-
// Kernel#pretty_inspect is always there
67-
return true;
68-
}
69-
7065
if (feature.equals("thread")) {
7166
return true;
7267
}

lib/ruby/truffle/mri/pp.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require_relative '../../stdlib/pp'

lib/ruby/truffle/mri/prettyprint.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require_relative '../../stdlib/prettyprint'

0 commit comments

Comments
 (0)