Skip to content

Commit

Permalink
Merge pull request #561 from jhawthorn/rb_sym2str
Browse files Browse the repository at this point in the history
Use rb_sym2str instead of SYM2ID
  • Loading branch information
hsbt authored Dec 6, 2023
2 parents a1af7a3 + 5cbafb8 commit 7864324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/json/ext/generator/generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ json_object_i(VALUE key, VALUE val, VALUE _arg)
if (klass == rb_cString) {
key_to_s = key;
} else if (klass == rb_cSymbol) {
key_to_s = rb_id2str(SYM2ID(key));
key_to_s = rb_sym2str(key);
} else {
key_to_s = rb_funcall(key, i_to_s, 0);
}
Expand Down

0 comments on commit 7864324

Please sign in to comment.