[#81999] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — ko1@...
Issue #13737 has been updated by ko1 (Koichi Sasada).
4 messages
2017/07/11
[#82005] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — nobu@...
Issue #13737 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/07/12
[#82102] Re: register_fstring_tainted:FL_TEST_RAW(str, RSTRING_FSTR) — Eric Wong <normalperson@...>
Koichi Sasada <ko1@atdot.net> wrote:
4 messages
2017/07/18
[#82151] [Ruby trunk Feature#13637] [PATCH] tool/runruby.rb: test with smallest possible machine stack — Rei.Odaira@...
Issue #13637 has been updated by ReiOdaira (Rei Odaira).
3 messages
2017/07/24
[ruby-core:81890] [Ruby trunk Bug#13196] Improve keyword argument errors when non-keyword arguments given
From:
hi@...
Date:
2017-07-04 00:31:59 UTC
List:
ruby-core #81890
Issue #13196 has been updated by olivierlacan (Olivier Lacan). matz (Yukihiro Matsumoto) wrote: > Agreed with better message description. Thank you. Is there anything I can do to help move this issue along? Is the patch sufficient? ---------------------------------------- Bug #13196: Improve keyword argument errors when non-keyword arguments given https://bugs.ruby-lang.org/issues/13196#change-65618 * Author: olivierlacan (Olivier Lacan) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- Given the following method definition: ```ruby def explode(code:) puts "Boom!" end ``` If a Ruby user doesn't provide any arguments when calling the `explode` method, the following helpful feedback is given: ```ruby explode ArgumentError: missing keyword: code ``` But when a Ruby user mistakenly provides a regular argument, the exception message is obtuse and unhelpful: ```ruby explode "1234" ArgumentError: wrong number of arguments (given 1, expected 0) ``` This does not provide information to properly recover from the error. Worse, it's incorrect. It is not true that the method expected 0 arguments. The method expected 1 keyword argument. Instead, Ruby should respond something like: ```ruby explode "1234" ArgumentError: missing keyword: code, given "1234" which is not a keyword argument. ``` One could argue that this situation would call for a different error class, perhaps a `KeywordArgumentError` that would inherit from `ArgumentError`, but that would extend the scope of this feature request a bit too far in my mind. ---Files-------------------------------- missing_kwargs.diff (1.2 KB) missing_kwargs.diff (1.23 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>