Skip to content

Commit 3c9da1f

Browse files
committed
time conversion: create utf8 string
Oj converts the string to UTF8 which inccurs in performance cost. Given that input string is UTF8, this code should be correct.
1 parent 7a73267 commit 3c9da1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/panko_serializer/time_conversion.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ VALUE iso_ar_iso_datetime_string(const char* value) {
120120
}
121121
*cur++ = 'Z';
122122

123-
output = rb_str_new(buf, cur - buf);
123+
output = rb_utf8_str_new(buf, cur - buf);
124124
return output;
125125
}
126126

0 commit comments

Comments
 (0)