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
This commit is contained in:
parent
cd83d26731
commit
b56f6a6b8c
10
error.c
10
error.c
@ -1705,14 +1705,10 @@ key_err_initialize(int argc, VALUE *argv, VALUE self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!NIL_P(options)) {
|
if (!NIL_P(options)) {
|
||||||
static ID keywords[2];
|
ID keywords[2];
|
||||||
VALUE values[2];
|
VALUE values[2];
|
||||||
if (!keywords[0]) {
|
keywords[0] = id_receiver;
|
||||||
CONST_ID(keywords[0], "receiver");
|
keywords[1] = id_key;
|
||||||
}
|
|
||||||
if (!keywords[1]) {
|
|
||||||
CONST_ID(keywords[1], "key");
|
|
||||||
}
|
|
||||||
rb_get_kwargs(options, keywords, 0, 2, values);
|
rb_get_kwargs(options, keywords, 0, 2, values);
|
||||||
if (values[0] != Qundef) {
|
if (values[0] != Qundef) {
|
||||||
receiver = values[0];
|
receiver = values[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user