[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_string_concat_node_t *str_concat_node = (pm_string_concat_node_t *)node;
|
||||||
PM_COMPILE(str_concat_node->left);
|
PM_COMPILE(str_concat_node->left);
|
||||||
PM_COMPILE(str_concat_node->right);
|
PM_COMPILE(str_concat_node->right);
|
||||||
|
if (!popped) {
|
||||||
|
ADD_INSN1(ret, &dummy_line_node, concatstrings, INT2FIX(2));
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case PM_STRING_NODE: {
|
case PM_STRING_NODE: {
|
||||||
|
@ -241,8 +241,8 @@ module Prism
|
|||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
def test_EmbeddedVariableNode
|
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"')
|
test_prism_eval('$pit = 1; "#$pit"')
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ module Prism
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_StringConcatNode
|
def test_StringConcatNode
|
||||||
# test_prism_eval('"Prism" "::" "TestCompilePrism"')
|
test_prism_eval('"Prism" "::" "TestCompilePrism"')
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_StringNode
|
def test_StringNode
|
||||||
@ -296,12 +296,12 @@ module Prism
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_XStringNode
|
def test_XStringNode
|
||||||
# test_prism_eval(<<~RUBY)
|
test_prism_eval(<<~RUBY)
|
||||||
# class Prism::TestCompilePrism
|
class Prism::TestCompilePrism
|
||||||
# def self.`(command) = command * 2
|
def self.`(command) = command * 2
|
||||||
# `pit`
|
`pit`
|
||||||
# end
|
end
|
||||||
# RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user