-
Notifications
You must be signed in to change notification settings - Fork 178
/
with_string_literal_in_when_clause.yaml
56 lines (56 loc) · 2.27 KB
/
with_string_literal_in_when_clause.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
subject: "case expression"
description: "with expression to match / and String literal in when clause (case exp when 'string' ... end)"
notes: >
String becomes frozen and is represented as FrozenStringLiteralNode
focused_on_node: "org.truffleruby.language.control.IfElseNode"
ruby: |
case 42
when "foo"
true
end
ast: |
IfElseNodeGen
attributes:
flags = 0
sourceCharIndex = -1
sourceLength = 0
children:
condition =
InlinedCaseEqualNodeGen
attributes:
assumptions = [Assumption(valid, name=set_trace_func is not used)]
flags = 0
integerCaseEqualAssumption = Assumption(valid, name=core method is not overridden:)
parameters = RubyCallNodeParameters{methodName='===', descriptor=NoKeywordArgumentsDescriptor, isSplatted=false, ignoreVisibility=true, isVCall=false, isSafeNavigation=false, isAttrAssign=false}
sourceCharIndex = -1
sourceLength = 0
children:
leftNode_ =
FrozenStringLiteralNode
attributes:
definition = "expression" (ASCII-8BIT)
flags = 0
frozenString = "foo" (UTF-8)
sourceCharIndex = 13
sourceLength = 5
rightNode_ =
ReadLocalVariableNode
attributes:
flags = 0
frameSlot = 2 # %case_0
sourceCharIndex = -1
sourceLength = 0
type = FRAME_LOCAL
elseBody =
NilLiteralNode
attributes:
flags = 0
sourceCharIndex = -1
sourceLength = 0
thenBody =
BooleanLiteralNode
attributes:
flags = 1
sourceCharIndex = 21
sourceLength = 4
value = true