diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-07-15 21:25:43 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-08-03 10:56:50 +0900 |
commit | 4c3140d60f6f94504842a4d0c0d79752a87aec8d (patch) | |
tree | ce3764fc7224b08da01186541550e98d1aaf7cdc /proc.c | |
parent | 731315bf5520a9ca7c94338c13d10c15b00c78c7 (diff) |
Add keyrest to ruby2_keywords parameters [Bug #18011]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4705
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -3097,7 +3097,12 @@ method_inspect(VALUE method) } } else if (kind == keyrest) { - rb_str_catf(str, "**%"PRIsVALUE, name); + if (name != ID2SYM(idPow)) { + rb_str_catf(str, "**%"PRIsVALUE, name); + } + else if (i > 0) { + rb_str_set_len(str, RSTRING_LEN(str) - 2); + } } else if (kind == block) { if (name == ID2SYM('&')) { |