Skip to content

Commit 13445b7

Browse files
committed
Adopt adding ShareableConstantNode node
The method visitShareableConstantNode is not implemented but it should be overridden in the YARPTranslator to suppress linter warning: ``` Missing methods in YARPTranslator: ["visitShareableConstantNode"] YARPTranslator should override all visit* methods from AbstractNodeVisitor. ```
1 parent 0448794 commit 13445b7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/main/java/org/truffleruby/parser/YARPTranslator.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3250,6 +3250,12 @@ public RubyNode visitStatementsNode(Nodes.StatementsNode node) {
32503250
return sequence(node, rubyNodes);
32513251
}
32523252

3253+
@Override
3254+
public RubyNode visitShareableConstantNode(Nodes.ShareableConstantNode node) {
3255+
// is not implemented for now but the method is supposed to be overridden
3256+
throw fail(node);
3257+
}
3258+
32533259
@Override
32543260
public RubyNode visitStringNode(Nodes.StringNode node) {
32553261
final RubyNode rubyNode;

test/mri/excludes/TestGc.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@
2020
exclude :test_stat_heap_all, "NoMethodError: undefined method `stat_heap' for GC:Module"
2121
exclude :test_latest_gc_info_need_major_by, "NameError: uninitialized constant GC::OPTS"
2222
exclude :test_thrashing_for_young_objects, "NoMethodError: undefined method `stat_heap' for GC:Module"
23+
exclude :test_ast_node_buffer, "SyntaxError: (eval):2: YARPTranslator does not know how to translate ShareableConstantNode at (eval):2"

0 commit comments

Comments
 (0)