Commit 4c00e56
committed
Use same logic as IR for kwarg handling in IO#write
When passing kwargs from a ruby2_keywords method to a core "real
keywords" method, we lose the keywordiness of the incoming hash
and raise an argument error for the arity mismatch. By using the
same logic as IR here, we properly handle the incoming r2k hash.
This same patch could be applied generally to all core methods that
accept keywords, but given the rarity of r2k to core "real
keywords" methods we have chosen to only do targeted fixes. This
reduces the potential impact (versus a new, more general solution)
and the required work (9.4.10 is eagerly awaited). We will explore
more reliable, general improvements to core method kwarg handling
in JRuby 10.
Fixes #8398.1 parent 5f77c63 commit 4c00e56
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
4292 | 4293 | | |
4293 | 4294 | | |
4294 | 4295 | | |
4295 | | - | |
| 4296 | + | |
4296 | 4297 | | |
4297 | 4298 | | |
4298 | 4299 | | |
4299 | 4300 | | |
4300 | 4301 | | |
4301 | 4302 | | |
4302 | | - | |
4303 | | - | |
| 4303 | + | |
| 4304 | + | |
4304 | 4305 | | |
4305 | 4306 | | |
4306 | 4307 | | |
4307 | 4308 | | |
4308 | | - | |
4309 | | - | |
| 4309 | + | |
| 4310 | + | |
| 4311 | + | |
| 4312 | + | |
| 4313 | + | |
4310 | 4314 | | |
4311 | 4315 | | |
4312 | 4316 | | |
| |||
0 commit comments