Merge pull request #5579 from dearblue/OP_ASET

Fixed a discrepancy in `OP_ASET`
This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-11-20 08:48:05 +09:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ OPCODE(ARYCAT, B) /* ary_cat(R[a],R[a+1]) */
OPCODE(ARYPUSH, BB) /* ary_push(R[a],R[a+1]..R[a+b]) */
OPCODE(ARYDUP, B) /* R[a] = ary_dup(R[a]) */
OPCODE(AREF, BBB) /* R[a] = R[b][c] */
OPCODE(ASET, BBB) /* R[a][c] = R[b] */
OPCODE(ASET, BBB) /* R[b][c] = R[a] */
OPCODE(APOST, BBB) /* *R[a],R[a+1]..R[a+c] = R[a][b..] */
OPCODE(INTERN, B) /* R[a] = intern(R[a]) */
OPCODE(SYMBOL, BB) /* R[a] = intern(Pool[b]) */
+1 -1
View File
@@ -2669,7 +2669,7 @@ RETRY_TRY_BLOCK:
}
CASE(OP_ASET, BBB) {
mrb_assert(mrb_type(regs[a]) == MRB_TT_ARRAY);
mrb_assert(mrb_type(regs[b]) == MRB_TT_ARRAY);
mrb_ary_set(mrb, regs[b], c, regs[a]);
NEXT;
}