summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authorS-H-GAMELINKS <gamelinks007@gmail.com>2022-05-01 23:13:59 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-06-17 12:02:50 +0900
commit420f3ced4d25c0e81d06f3186c8cfdc509326268 (patch)
tree273755e3b753cd5aed06f786947cd7dcc2f223f5 /marshal.c
parent51a3ebf4ec6182ee516992dc761950d19a7b697b (diff)
Using is_ascii_string to check encoding
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5867
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index c5327fca60..8267658f5c 100644
--- a/marshal.c
+++ b/marshal.c
@@ -481,7 +481,7 @@ w_symbol(VALUE sym, struct dump_arg *arg)
}
encname = encoding_name(sym, arg);
if (NIL_P(encname) ||
- rb_enc_str_coderange(sym) == ENC_CODERANGE_7BIT) {
+ is_ascii_string(sym)) {
encname = Qnil;
}
else {