irb fails to define a method with a reserved-word-ish keyword argument
ruby 2.4.0dev (2016-12-07 trunk 57012) [x86_64-darwin14]
def a(if:) end
is a valid ruby code but this doesn't work on irb.
This seems to be happening for all keywords that are listed in
Updated by nobu (Nobuyoshi Nakada) about 4 years ago
- Status changed from Open to Closed
Applied in changeset r57027.
ruby-lex.rb: fix for label
- lib/irb/ruby-lex.rb (identify_identifier): treat identifier just followed by a colon as a lable. this is not a precise solution but enough for the time being. [ruby-core:78526] [Bug #13012]