Issue #17345 has been updated by no6v (Nobuhiro IMAI). > Now, the '#tok' on some error events are `Elem` instead of string. pull request: https://github.com/ruby/ruby/pull/3936 ---------------------------------------- Bug #17345: ripper: nothing raised when assigning to keyword variables https://bugs.ruby-lang.org/issues/17345#change-89296 * Author: no6v (Nobuhiro IMAI) * Status: Closed * Priority: Normal * ruby -v: ruby 3.0.0dev (2020-11-25T04:36:39Z master 00f046ef57) [x86_64-linux] * Backport: 2.5: REQUIRED, 2.6: REQUIRED, 2.7: REQUIRED ---------------------------------------- ```ruby require "ripper" Ripper.tokenize("retry=1", raise_errors: true) # => SyntaxError (syntax error, unexpected '=', expecting end-of-input) Ripper.tokenize("nil=1", raise_errors: true) # => ["nil", "=", "1"] lexer = Ripper::Lexer.new("nil=1") lexer.tokenize # => ["nil", "=", "1"] lexer.error? # => true lexer.errors # => [] ``` Lexer recognizes there was an error, but nothing is set to `errors`. -- 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>