1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

dir.c, io.c: use rb_id_encoding

* dir.c (dir_initialize): rb_id_encoding() returns same ID with
  caching.

* io.c (Init_IO): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-12-09 18:15:04 +00:00
parent ccc776613d
commit dec78a7a73
2 changed files with 2 additions and 2 deletions

2
dir.c
View file

@ -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();

2
io.c
View file

@ -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"));