ruby/defs
Randy Stauner acbb8d4fb5 Expand opt_newarray_send to support Array#pack with buffer keyword arg
Use an enum for the method arg instead of needing to add an id
that doesn't map to an actual method name.

$ ruby --dump=insns -e 'b = "x"; [v].pack("E*", buffer: b)'

before:

```
== disasm: #<ISeq:<main>@-e:1 (1,0)-(1,34)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] b@0
0000 putchilledstring                       "x"                       (   1)[Li]
0002 setlocal_WC_0                          b@0
0004 putself
0005 opt_send_without_block                 <calldata!mid:v, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0007 newarray                               1
0009 putchilledstring                       "E*"
0011 getlocal_WC_0                          b@0
0013 opt_send_without_block                 <calldata!mid:pack, argc:2, kw:[#<Symbol:0x000000000023110c>], KWARG>
0015 leave
```

after:

```
== disasm: #<ISeq:<main>@-e:1 (1,0)-(1,34)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] b@0
0000 putchilledstring                       "x"                       (   1)[Li]
0002 setlocal_WC_0                          b@0
0004 putself
0005 opt_send_without_block                 <calldata!mid:v, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0007 putchilledstring                       "E*"
0009 getlocal                               b@0, 0
0012 opt_newarray_send                      3, 5
0015 leave
```
2024-07-29 16:26:58 -04:00
..
gmake.mk Prevent test-bundled-gems outputs from mixing 2024-05-26 22:17:57 +09:00
id.def Expand opt_newarray_send to support Array#pack with buffer keyword arg 2024-07-29 16:26:58 -04:00
keywords reserved_word: just use gperf 3.1 declaration 2022-09-21 11:44:09 +09:00
known_errors.def Add/revise Errno descriptions (#10897) 2024-06-04 15:19:50 +00:00
lex.c.src reserved_word: just use gperf 3.1 declaration 2022-09-21 11:44:09 +09:00
opt_insn_unif.def setdynamic is obsoleted 2016-04-27 07:11:06 +00:00
opt_operand.def * defs/opt_operand.def: Fix typo 2013-12-22 01:11:07 +00:00
separated_version.mk Fixed misspellings 2019-12-20 09:32:42 +09:00
tags.mk Add TAGS rule [ci skip] 2023-02-08 18:00:05 +09:00