diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-08-25 09:10:37 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-08-25 09:41:21 +0900 |
| commit | 49d1b168221221b7e810f001d88e16ebc94378fd (patch) | |
| tree | 10ff0f8b4e9b8bb7e8dea4003f2126e9e2c3bf5b /include | |
| parent | 306732e02da5f0d47f44033ec1a3af1a77c5f418 (diff) | |
| download | mruby-49d1b168221221b7e810f001d88e16ebc94378fd.tar.gz mruby-49d1b168221221b7e810f001d88e16ebc94378fd.zip | |
Hash splat `**` should not be ignored.
Implemented by adding `OP_HASHCAT` that merges hashes.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/ops.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mruby/ops.h b/include/mruby/ops.h index b8fc89d43..f23bb1b0b 100644 --- a/include/mruby/ops.h +++ b/include/mruby/ops.h @@ -94,6 +94,7 @@ OPCODE(STRING, BB) /* R(a) = str_dup(Lit(b)) */ OPCODE(STRCAT, B) /* str_cat(R(a),R(a+1)) */ OPCODE(HASH, BB) /* R(a) = hash_new(R(a),R(a+1)..R(a+b)) */ OPCODE(HASHADD, BB) /* R(a) = hash_push(R(a),R(a+1)..R(a+b)) */ +OPCODE(HASHCAT, B) /* R(a) = hash_cat(R(a),R(a+1)) */ OPCODE(LAMBDA, BB) /* R(a) = lambda(SEQ[b],L_LAMBDA) */ OPCODE(BLOCK, BB) /* R(a) = lambda(SEQ[b],L_BLOCK) */ OPCODE(METHOD, BB) /* R(a) = lambda(SEQ[b],L_METHOD) */ |
