mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
Assert that Symbol#inspect returns a T_STRING
This commit is contained in:
parent
fbeb8f2c78
commit
e50590a541
1 changed files with 3 additions and 0 deletions
3
string.c
3
string.c
|
@ -11763,6 +11763,9 @@ sym_inspect(VALUE sym)
|
|||
RB_GC_GUARD(orig_str);
|
||||
}
|
||||
dest[0] = ':';
|
||||
|
||||
RUBY_ASSERT(BUILTIN_TYPE(str) == T_STRING);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue