diff --git a/dir.c b/dir.c index 71696149d7..0311bf0cce 100644 --- a/dir.c +++ b/dir.c @@ -491,7 +491,7 @@ dir_initialize(int argc, VALUE *argv, VALUE dir) const char *path; if (!keyword_ids[0]) { - keyword_ids[0] = rb_intern("encoding"); + keyword_ids[0] = rb_id_encoding(); } fsenc = rb_filesystem_encoding(); diff --git a/io.c b/io.c index 99cd9bb5cd..d5bd2fc84f 100644 --- a/io.c +++ b/io.c @@ -12494,7 +12494,7 @@ Init_IO(void) sym_flags = ID2SYM(rb_intern("flags")); sym_extenc = ID2SYM(rb_intern("external_encoding")); sym_intenc = ID2SYM(rb_intern("internal_encoding")); - sym_encoding = ID2SYM(rb_intern("encoding")); + sym_encoding = ID2SYM(rb_id_encoding()); sym_open_args = ID2SYM(rb_intern("open_args")); sym_textmode = ID2SYM(rb_intern("textmode")); sym_binmode = ID2SYM(rb_intern("binmode"));