File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -891,10 +891,20 @@ def inspect
891
891
@s . rb_sprintf3 ( ToSOrInspect . new ) . should == s
892
892
end
893
893
894
- it "formats a string VALUE using to inspect if sign specified in format" do
894
+ it "formats a string VALUE using inspect if sign specified in format" do
895
895
s = 'Result: A different string.'
896
896
@s . rb_sprintf4 ( ToSOrInspect . new ) . should == s
897
897
end
898
+
899
+ it "formats a TrueClass VALUE as `TrueClass` if sign not specified in format" do
900
+ s = 'Result: TrueClass.'
901
+ @s . rb_sprintf3 ( true . class ) . should == s
902
+ end
903
+
904
+ it "formats a TrueClass VALUE as 'true' if sign specified in format" do
905
+ s = 'Result: true.'
906
+ @s . rb_sprintf4 ( true . class ) . should == s
907
+ end
898
908
end
899
909
900
910
describe "rb_vsprintf" do
Original file line number Diff line number Diff line change @@ -32,8 +32,6 @@ void* rb_tr_true;
32
32
void * rb_tr_false ;
33
33
void * rb_tr_nil ;
34
34
35
- // Run when loading C-extension support
36
-
37
35
#ifdef __APPLE__
38
36
static printf_domain_t printf_domain ;
39
37
@@ -70,10 +68,6 @@ static int rb_tr_fprintf_value(FILE *stream,
70
68
if (RB_TYPE_P (v , T_CLASS )) {
71
69
if (v == rb_cNilClass ) {
72
70
cstr = "nil" ;
73
- } else if (v == rb_cInteger ) {
74
- cstr = "Integer" ;
75
- } else if (v == rb_cSymbol ) {
76
- cstr = "Symbol" ;
77
71
} else if (v == rb_cTrueClass ) {
78
72
cstr = "true" ;
79
73
} else if (v == rb_cFalseClass ) {
@@ -94,6 +88,8 @@ static int rb_tr_fprintf_value(FILE *stream,
94
88
return len ;
95
89
}
96
90
91
+ // Run when loading C-extension support
92
+
97
93
void rb_tr_init (void * ruby_cext ) {
98
94
truffle_assign_managed (& rb_tr_cext , ruby_cext );
99
95
truffle_assign_managed (& rb_tr_undef , rb_tr_get_undef ());
You can’t perform that action at this time.
0 commit comments