ruby-changes:40903
From: nobu <ko1@a...>
Date: Wed, 9 Dec 2015 08:41:48 +0900 (JST)
Subject: [ruby-changes:40903] nobu:r52982 (trunk): string.c: use rb_id_encoding
nobu 2015-12-09 08:41:27 +0900 (Wed, 09 Dec 2015) New Revision: 52982 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52982 Log: string.c: use rb_id_encoding * string.c (rb_str_init): rb_id_encoding() returns same ID with caching. Modified files: trunk/string.c Index: string.c =================================================================== --- string.c (revision 52981) +++ string.c (revision 52982) @@ -1340,7 +1340,7 @@ rb_str_init(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/string.c#L1340 int n; if (!keyword_ids[0]) - keyword_ids[0] = rb_intern("encoding"); + keyword_ids[0] = rb_id_encoding(); n = rb_scan_args(argc, argv, "01:", &orig, &opt); if (argc > 0 && n == 1) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/