Commit fdba897
stdlib: Accept keyword arguments in
In the original definition, keyword arguments could not be specified
without specifying all positional arguments.
Specifically, the following call results in an error with
`Ruby::ArgumentTypeMismatch`.
```rb
Net::HTTP.start('www.ruby-lang.org', 443, use_ssl: true)
```
This is because opt is treated as a hash positional argument.
This problem is solved by treating opt as a variable-length keyword argument.
ref. https://docs.ruby-lang.org/ja/latest/method/Net=3a=3aHTTP/s/start.htmlNet::HTTP.start
1 parent a39cabf commit fdba897
2 files changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
978 | 978 | | |
979 | 979 | | |
980 | 980 | | |
981 | | - | |
982 | | - | |
| 981 | + | |
| 982 | + | |
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
54 | 65 | | |
55 | 66 | | |
56 | 67 | | |
| |||
0 commit comments