File tree 2 files changed +4
-24
lines changed
2 files changed +4
-24
lines changed Original file line number Diff line number Diff line change 12
12
* .a
13
13
mkmf.log
14
14
perf.data
15
+ perf.data.old
Original file line number Diff line number Diff line change @@ -13,27 +13,6 @@ class RubyObjectEncoder {
13
13
StringBuffer buf;
14
14
Writer<StringBuffer> writer;
15
15
16
- void test () {
17
- writer.Key (" hello" );
18
- writer.String (" world" );
19
- writer.Key (" t" );
20
- writer.Bool (true );
21
- writer.Key (" f" );
22
- writer.Bool (false );
23
- writer.Key (" n" );
24
- writer.Null ();
25
- writer.Key (" i" );
26
- writer.Uint (123 );
27
- writer.Key (" pi" );
28
- writer.Double (3.1416 );
29
- writer.Key (" a" );
30
- writer.StartArray ();
31
- for (unsigned i = 0 ; i < 4 ; i++)
32
- writer.Uint (i);
33
- writer.EndArray ();
34
- writer.EndObject ();
35
- }
36
-
37
16
void encode_array (VALUE ary) {
38
17
writer.StartArray ();
39
18
int length = RARRAY_LEN (ary);
@@ -48,7 +27,7 @@ class RubyObjectEncoder {
48
27
void encode_key (VALUE key) {
49
28
switch (rb_type (key)) {
50
29
case T_STRING:
51
- writer.Key (RSTRING_PTR (key), RSTRING_LEN (key));
30
+ writer.Key (RSTRING_PTR (key), RSTRING_LEN (key), false );
52
31
return ;
53
32
default :
54
33
raise_unknown (key);
@@ -73,7 +52,7 @@ class RubyObjectEncoder {
73
52
}
74
53
75
54
void encode_fixnum (VALUE v) {
76
- writer.Int (RB_FIX2INT (v));
55
+ writer.Int (FIX2LONG (v));
77
56
}
78
57
79
58
void encode_float (VALUE v) {
@@ -83,7 +62,7 @@ class RubyObjectEncoder {
83
62
84
63
void encode_string (VALUE v) {
85
64
// fixme: copy boolean?
86
- writer.String (RSTRING_PTR (v), RSTRING_LEN (v));
65
+ writer.String (RSTRING_PTR (v), RSTRING_LEN (v), false );
87
66
}
88
67
89
68
void encode_any (VALUE v) {
You can’t perform that action at this time.
0 commit comments