diff options
author | S-H-GAMELINKS <gamelinks007@gmail.com> | 2022-09-10 02:00:34 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-09-10 09:32:51 +0900 |
commit | 79f50b9d02b228aba2d8887422f00767046051a6 (patch) | |
tree | cd82f052757a106fa42bf9cadc732576193c66bd /marshal.c | |
parent | 518301883edee12218657c77ba977e2bde1b17d0 (diff) |
Using is_broken_string function
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6346
Diffstat (limited to 'marshal.c')
-rw-r--r-- | marshal.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1554,7 +1554,7 @@ r_symreal(struct load_arg *arg, int ivar) } if (idx > 0) { rb_enc_associate_index(s, idx); - if (rb_enc_str_coderange(s) == ENC_CODERANGE_BROKEN) { + if (is_broken_string(s)) { rb_raise(rb_eArgError, "invalid byte sequence in %s: %+"PRIsVALUE, rb_enc_name(rb_enc_from_index(idx)), s); } |