diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-09-21 16:47:55 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-09-21 16:47:55 +0900 |
| commit | 913a0a5a036664ab0d12a1af40b652412301c89f (patch) | |
| tree | 702b615bbb1a792e0cbdc885b71f2d1708e0d5f6 /src | |
| parent | dd0caf87280b6fd1a7c5f43b65ed9ea73e833317 (diff) | |
| download | mruby-913a0a5a036664ab0d12a1af40b652412301c89f.tar.gz mruby-913a0a5a036664ab0d12a1af40b652412301c89f.zip | |
vm.c: add assertions instead of `mrb_ensure_hash_type()`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2687,7 +2687,7 @@ RETRY_TRY_BLOCK: int lim = a+b*2+1; hash = regs[a]; - mrb_ensure_hash_type(mrb, hash); + mrb_assert(mrb_type(hash) == MRB_TT_HASH); for (i=a+1; i<lim; i+=2) { mrb_hash_set(mrb, hash, regs[i], regs[i+1]); } @@ -2697,7 +2697,7 @@ RETRY_TRY_BLOCK: CASE(OP_HASHCAT, B) { mrb_value hash = regs[a]; - mrb_ensure_hash_type(mrb, hash); + mrb_assert(mrb_type(hash) == MRB_TT_HASH); mrb_hash_merge(mrb, hash, regs[a+1]); mrb_gc_arena_restore(mrb, ai); NEXT; |
