[PRISM] Fixed StringConcatNode, uncommented tests
This commit is contained in:
parent
8b3d044004
commit
a426a230de
@ -2429,6 +2429,9 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
|
||||
pm_string_concat_node_t *str_concat_node = (pm_string_concat_node_t *)node;
|
||||
PM_COMPILE(str_concat_node->left);
|
||||
PM_COMPILE(str_concat_node->right);
|
||||
if (!popped) {
|
||||
ADD_INSN1(ret, &dummy_line_node, concatstrings, INT2FIX(2));
|
||||
}
|
||||
return;
|
||||
}
|
||||
case PM_STRING_NODE: {
|
||||
|
@ -241,8 +241,8 @@ module Prism
|
||||
############################################################################
|
||||
|
||||
def test_EmbeddedVariableNode
|
||||
# test_prism_eval('class Prism::TestCompilePrism; @pit = 1; "#@pit"; end')
|
||||
# test_prism_eval('class Prism::TestCompilePrism; @@pit = 1; "#@@pit"; end')
|
||||
test_prism_eval('class Prism::TestCompilePrism; @pit = 1; "#@pit"; end')
|
||||
test_prism_eval('class Prism::TestCompilePrism; @@pit = 1; "#@@pit"; end')
|
||||
test_prism_eval('$pit = 1; "#$pit"')
|
||||
end
|
||||
|
||||
@ -284,7 +284,7 @@ module Prism
|
||||
end
|
||||
|
||||
def test_StringConcatNode
|
||||
# test_prism_eval('"Prism" "::" "TestCompilePrism"')
|
||||
test_prism_eval('"Prism" "::" "TestCompilePrism"')
|
||||
end
|
||||
|
||||
def test_StringNode
|
||||
@ -296,12 +296,12 @@ module Prism
|
||||
end
|
||||
|
||||
def test_XStringNode
|
||||
# test_prism_eval(<<~RUBY)
|
||||
# class Prism::TestCompilePrism
|
||||
# def self.`(command) = command * 2
|
||||
# `pit`
|
||||
# end
|
||||
# RUBY
|
||||
test_prism_eval(<<~RUBY)
|
||||
class Prism::TestCompilePrism
|
||||
def self.`(command) = command * 2
|
||||
`pit`
|
||||
end
|
||||
RUBY
|
||||
end
|
||||
|
||||
############################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user