diff options
author | Jeremy Evans <[email protected]> | 2024-07-03 12:17:12 -0700 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2024-09-18 21:29:07 -0700 |
commit | 8dc0d2904a7d859b463a3f44ac73e5d4540a1cc1 (patch) | |
tree | 6ba8d71d1ce137f98128ac69d4a231ebe0302df9 /string.c | |
parent | 268c72377b06b7d84a0998ca241340d0f58768f6 (diff) |
Update exception message in string_for_symbol
This is a static function only called in two places (rb_to_id and
rb_to_symbol), and in both places, both symbols and strings are
allowed. This makes the error message consistent with rb_check_id
and rb_check_symbol.
Fixes [Bug #20607]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11097
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -12398,7 +12398,7 @@ string_for_symbol(VALUE name) if (!RB_TYPE_P(name, T_STRING)) { VALUE tmp = rb_check_string_type(name); if (NIL_P(tmp)) { - rb_raise(rb_eTypeError, "%+"PRIsVALUE" is not a symbol", + rb_raise(rb_eTypeError, "%+"PRIsVALUE" is not a symbol nor a string", name); } name = tmp; |