mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
hash.c (mrb_hash_aset): use pre-assigned local variable
This commit is contained in:
+2
-1
@@ -1584,9 +1584,10 @@ mrb_hash_aset(mrb_state *mrb, mrb_value self)
|
||||
}
|
||||
|
||||
const mrb_value *argv = mrb_get_argv(mrb);
|
||||
mrb_value key = argv[0];
|
||||
mrb_value val = argv[1];
|
||||
|
||||
mrb_hash_set(mrb, self, argv[0], argv[1]);
|
||||
mrb_hash_set(mrb, self, key, val);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user