We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5566a7f commit 7f0c6d3Copy full SHA for 7f0c6d3
ext/json/generator/generator.c
@@ -794,7 +794,7 @@ convert_string_subclass(VALUE key)
794
{
795
VALUE key_to_s = rb_funcall(key, i_to_s, 0);
796
797
- if (RB_UNLIKELY(rb_type(key_to_s) != T_STRING)) {
+ if (RB_UNLIKELY(!RB_TYPE_P(key_to_s, T_STRING))) {
798
VALUE cname = rb_obj_class(key);
799
rb_raise(rb_eTypeError,
800
"can't convert %"PRIsVALUE" to %s (%"PRIsVALUE"#%s gives %"PRIsVALUE")",
0 commit comments