summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 18:15:04 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 18:15:04 (GMT)
commitdec78a7a732a2a4c494482fa3061b794e997269b (patch)
tree23a8cb98ac5226603252deb21c6920c3eec0fbaf
parentccc776613df8db663e4bf8fd6b4b9fe1cdd952f0 (diff)
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
-rw-r--r--dir.c2
-rw-r--r--io.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index 7169614..0311bf0 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 99cd9bb..d5bd2fc 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"));