Skip to content

Commit

Permalink
Assert that Symbol#inspect returns a T_STRING
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzhu2118 committed Apr 5, 2024
1 parent fbeb8f2 commit e50590a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions string.c
Expand Up @@ -11763,6 +11763,9 @@ sym_inspect(VALUE sym)
RB_GC_GUARD(orig_str);
}
dest[0] = ':';

RUBY_ASSERT(BUILTIN_TYPE(str) == T_STRING);

return str;
}

Expand Down

0 comments on commit e50590a

Please sign in to comment.