aboutsummaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-26 05:34:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-26 05:34:18 +0000
commitcd77acbf5fcb6811593ad4f47777a62b6463a7e8 (patch)
tree16f31f7543c7fb96a534666deaa44a2d5d471e22 /error.c
parent46bd3da7249d287c23e1f87d23b1265a5b2adfcd (diff)
downloadruby-cd77acbf5fcb6811593ad4f47777a62b6463a7e8.tar.gz
error.c: use already initialized IDs
[Feature #14313] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/error.c b/error.c
index d2699b91e3..990f9f7855 100644
--- a/error.c
+++ b/error.c
@@ -1705,14 +1705,10 @@ key_err_initialize(int argc, VALUE *argv, VALUE self)
}
if (!NIL_P(options)) {
- static ID keywords[2];
+ ID keywords[2];
VALUE values[2];
- if (!keywords[0]) {
- CONST_ID(keywords[0], "receiver");
- }
- if (!keywords[1]) {
- CONST_ID(keywords[1], "key");
- }
+ keywords[0] = id_receiver;
+ keywords[1] = id_key;
rb_get_kwargs(options, keywords, 0, 2, values);
if (values[0] != Qundef) {
receiver = values[0];