Skip to content

Commit be07691

Browse files
committed
1 parent 9ce426f commit be07691

File tree

8 files changed

+28
-28
lines changed

8 files changed

+28
-28
lines changed

compiled/graphviz/enum_import_literals.dot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ digraph {
1414
</TABLE>>];
1515
enum_import_literals__inst__pet_1_to_i [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
1616
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
17-
<TR><TD>pet_1_to_i</TD><TD>Enum0::I__ANIMAL[:animal_cat]</TD></TR>
17+
<TR><TD>pet_1_to_i</TD><TD>(Enum0::I__ANIMAL[:animal_cat] || :animal_cat)</TD></TR>
1818
</TABLE>>];
1919
enum_import_literals__inst__pet_2 [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
2020
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>

compiled/graphviz/enum_to_i.dot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ digraph {
1212
</TABLE>>];
1313
enum_to_i__inst__one_lt_two [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
1414
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
15-
<TR><TD>one_lt_two</TD><TD>I__ANIMAL[pet_1] &lt; I__ANIMAL[pet_2]</TD></TR>
15+
<TR><TD>one_lt_two</TD><TD>(I__ANIMAL[pet_1] || pet_1) &lt; (I__ANIMAL[pet_2] || pet_2)</TD></TR>
1616
</TABLE>>];
1717
enum_to_i__inst__pet_1_eq_int [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
1818
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
19-
<TR><TD>pet_1_eq_int</TD><TD>I__ANIMAL[pet_1] == 7</TD></TR>
19+
<TR><TD>pet_1_eq_int</TD><TD>(I__ANIMAL[pet_1] || pet_1) == 7</TD></TR>
2020
</TABLE>>];
2121
enum_to_i__inst__pet_1_i [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
2222
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
23-
<TR><TD>pet_1_i</TD><TD>I__ANIMAL[pet_1]</TD></TR>
23+
<TR><TD>pet_1_i</TD><TD>(I__ANIMAL[pet_1] || pet_1)</TD></TR>
2424
</TABLE>>];
2525
enum_to_i__inst__pet_1_i_to_s [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
2626
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
27-
<TR><TD>pet_1_i_to_s</TD><TD>I__ANIMAL[pet_1].to_s</TD></TR>
27+
<TR><TD>pet_1_i_to_s</TD><TD>(I__ANIMAL[pet_1] || pet_1).to_s</TD></TR>
2828
</TABLE>>];
2929
enum_to_i__inst__pet_1_mod [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
3030
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
31-
<TR><TD>pet_1_mod</TD><TD>I__ANIMAL[pet_1] + 32768</TD></TR>
31+
<TR><TD>pet_1_mod</TD><TD>(I__ANIMAL[pet_1] || pet_1) + 32768</TD></TR>
3232
</TABLE>>];
3333
enum_to_i__inst__pet_2_eq_int [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
3434
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
35-
<TR><TD>pet_2_eq_int</TD><TD>I__ANIMAL[pet_2] == 5</TD></TR>
35+
<TR><TD>pet_2_eq_int</TD><TD>(I__ANIMAL[pet_2] || pet_2) == 5</TD></TR>
3636
</TABLE>>];
3737
}
3838
enum_to_i__seq:pet_1_type -> enum_to_i__inst__one_lt_two [color="#404040"];

compiled/graphviz/enum_to_i_class_border_2.dot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ digraph {
1010
</TABLE>>];
1111
enum_to_i_class_border_2__inst__is_dog [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
1212
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
13-
<TR><TD>is_dog</TD><TD>EnumToIClassBorder1::I__ANIMAL[parent.some_dog] == 4</TD></TR>
13+
<TR><TD>is_dog</TD><TD>(EnumToIClassBorder1::I__ANIMAL[parent.some_dog] || parent.some_dog) == 4</TD></TR>
1414
</TABLE>>];
1515
}
1616
enum_to_i_class_border_1__inst__some_dog:some_dog_type -> enum_to_i_class_border_2__inst__is_dog [color="#404040"];

compiled/graphviz/enum_to_i_invalid.dot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ digraph {
1212
</TABLE>>];
1313
enum_to_i_invalid__inst__one_lt_two [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
1414
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
15-
<TR><TD>one_lt_two</TD><TD>I__ANIMAL[pet_1] &lt; I__ANIMAL[pet_2]</TD></TR>
15+
<TR><TD>one_lt_two</TD><TD>(I__ANIMAL[pet_1] || pet_1) &lt; (I__ANIMAL[pet_2] || pet_2)</TD></TR>
1616
</TABLE>>];
1717
enum_to_i_invalid__inst__pet_2_eq_int_f [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
1818
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
19-
<TR><TD>pet_2_eq_int_f</TD><TD>I__ANIMAL[pet_2] == 110</TD></TR>
19+
<TR><TD>pet_2_eq_int_f</TD><TD>(I__ANIMAL[pet_2] || pet_2) == 110</TD></TR>
2020
</TABLE>>];
2121
enum_to_i_invalid__inst__pet_2_eq_int_t [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
2222
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
23-
<TR><TD>pet_2_eq_int_t</TD><TD>I__ANIMAL[pet_2] == 111</TD></TR>
23+
<TR><TD>pet_2_eq_int_t</TD><TD>(I__ANIMAL[pet_2] || pet_2) == 111</TD></TR>
2424
</TABLE>>];
2525
enum_to_i_invalid__inst__pet_2_i [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
2626
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
27-
<TR><TD>pet_2_i</TD><TD>I__ANIMAL[pet_2]</TD></TR>
27+
<TR><TD>pet_2_i</TD><TD>(I__ANIMAL[pet_2] || pet_2)</TD></TR>
2828
</TABLE>>];
2929
enum_to_i_invalid__inst__pet_2_i_to_s [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
3030
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
31-
<TR><TD>pet_2_i_to_s</TD><TD>I__ANIMAL[pet_2].to_s</TD></TR>
31+
<TR><TD>pet_2_i_to_s</TD><TD>(I__ANIMAL[pet_2] || pet_2).to_s</TD></TR>
3232
</TABLE>>];
3333
enum_to_i_invalid__inst__pet_2_mod [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
3434
<TR><TD BGCOLOR="#E0FFE0">id</TD><TD BGCOLOR="#E0FFE0">value</TD></TR>
35-
<TR><TD>pet_2_mod</TD><TD>I__ANIMAL[pet_2] + 32768</TD></TR>
35+
<TR><TD>pet_2_mod</TD><TD>(I__ANIMAL[pet_2] || pet_2) + 32768</TD></TR>
3636
</TABLE>>];
3737
}
3838
enum_to_i_invalid__seq:pet_1_type -> enum_to_i_invalid__inst__one_lt_two [color="#404040"];

compiled/ruby/enum_import_literals.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def pet_1_eq
2222
end
2323
def pet_1_to_i
2424
return @pet_1_to_i unless @pet_1_to_i.nil?
25-
@pet_1_to_i = Enum0::I__ANIMAL[:animal_cat]
25+
@pet_1_to_i = (Enum0::I__ANIMAL[:animal_cat] || :animal_cat)
2626
@pet_1_to_i
2727
end
2828
def pet_2

compiled/ruby/enum_to_i.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,32 @@ def _read
2626
end
2727
def one_lt_two
2828
return @one_lt_two unless @one_lt_two.nil?
29-
@one_lt_two = I__ANIMAL[pet_1] < I__ANIMAL[pet_2]
29+
@one_lt_two = (I__ANIMAL[pet_1] || pet_1) < (I__ANIMAL[pet_2] || pet_2)
3030
@one_lt_two
3131
end
3232
def pet_1_eq_int
3333
return @pet_1_eq_int unless @pet_1_eq_int.nil?
34-
@pet_1_eq_int = I__ANIMAL[pet_1] == 7
34+
@pet_1_eq_int = (I__ANIMAL[pet_1] || pet_1) == 7
3535
@pet_1_eq_int
3636
end
3737
def pet_1_i
3838
return @pet_1_i unless @pet_1_i.nil?
39-
@pet_1_i = I__ANIMAL[pet_1]
39+
@pet_1_i = (I__ANIMAL[pet_1] || pet_1)
4040
@pet_1_i
4141
end
4242
def pet_1_i_to_s
4343
return @pet_1_i_to_s unless @pet_1_i_to_s.nil?
44-
@pet_1_i_to_s = I__ANIMAL[pet_1].to_s
44+
@pet_1_i_to_s = (I__ANIMAL[pet_1] || pet_1).to_s
4545
@pet_1_i_to_s
4646
end
4747
def pet_1_mod
4848
return @pet_1_mod unless @pet_1_mod.nil?
49-
@pet_1_mod = I__ANIMAL[pet_1] + 32768
49+
@pet_1_mod = (I__ANIMAL[pet_1] || pet_1) + 32768
5050
@pet_1_mod
5151
end
5252
def pet_2_eq_int
5353
return @pet_2_eq_int unless @pet_2_eq_int.nil?
54-
@pet_2_eq_int = I__ANIMAL[pet_2] == 5
54+
@pet_2_eq_int = (I__ANIMAL[pet_2] || pet_2) == 5
5555
@pet_2_eq_int
5656
end
5757
attr_reader :pet_1

compiled/ruby/enum_to_i_class_border_2.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _read
1919
end
2020
def is_dog
2121
return @is_dog unless @is_dog.nil?
22-
@is_dog = EnumToIClassBorder1::I__ANIMAL[parent.some_dog] == 4
22+
@is_dog = (EnumToIClassBorder1::I__ANIMAL[parent.some_dog] || parent.some_dog) == 4
2323
@is_dog
2424
end
2525
attr_reader :parent

compiled/ruby/enum_to_i_invalid.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,32 @@ def _read
2525
end
2626
def one_lt_two
2727
return @one_lt_two unless @one_lt_two.nil?
28-
@one_lt_two = I__ANIMAL[pet_1] < I__ANIMAL[pet_2]
28+
@one_lt_two = (I__ANIMAL[pet_1] || pet_1) < (I__ANIMAL[pet_2] || pet_2)
2929
@one_lt_two
3030
end
3131
def pet_2_eq_int_f
3232
return @pet_2_eq_int_f unless @pet_2_eq_int_f.nil?
33-
@pet_2_eq_int_f = I__ANIMAL[pet_2] == 110
33+
@pet_2_eq_int_f = (I__ANIMAL[pet_2] || pet_2) == 110
3434
@pet_2_eq_int_f
3535
end
3636
def pet_2_eq_int_t
3737
return @pet_2_eq_int_t unless @pet_2_eq_int_t.nil?
38-
@pet_2_eq_int_t = I__ANIMAL[pet_2] == 111
38+
@pet_2_eq_int_t = (I__ANIMAL[pet_2] || pet_2) == 111
3939
@pet_2_eq_int_t
4040
end
4141
def pet_2_i
4242
return @pet_2_i unless @pet_2_i.nil?
43-
@pet_2_i = I__ANIMAL[pet_2]
43+
@pet_2_i = (I__ANIMAL[pet_2] || pet_2)
4444
@pet_2_i
4545
end
4646
def pet_2_i_to_s
4747
return @pet_2_i_to_s unless @pet_2_i_to_s.nil?
48-
@pet_2_i_to_s = I__ANIMAL[pet_2].to_s
48+
@pet_2_i_to_s = (I__ANIMAL[pet_2] || pet_2).to_s
4949
@pet_2_i_to_s
5050
end
5151
def pet_2_mod
5252
return @pet_2_mod unless @pet_2_mod.nil?
53-
@pet_2_mod = I__ANIMAL[pet_2] + 32768
53+
@pet_2_mod = (I__ANIMAL[pet_2] || pet_2) + 32768
5454
@pet_2_mod
5555
end
5656
attr_reader :pet_1

0 commit comments

Comments
 (0)