[ruby-dev:52068] [Ruby master Bug#10436] ruby -c and ripper inconsistency: m(&nil) {}

Issue #10436 has been updated by yui-knk (Kaneko Yuichiro). Status changed from Open to Closed This is solved by https://bugs.ruby-lang.org/issues/20257 (https://github.com/ruby/ruby/pull/9923). ---------------------------------------- Bug #10436: ruby -c and ripper inconsistency: m(&nil) {} https://bugs.ruby-lang.org/issues/10436#change-106914 * Author: akr (Akira Tanaka) * Status: Closed * Priority: Normal * ruby -v: ruby 2.2.0dev (2014-10-27 trunk 48168) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- m(&nil) {} というまちがったコードは ruby -c でちゃんとエラーになるのに、 Ripper.sexp ではならないようです。 ``` % cat z.rb m(&nil) {} % ruby -c z.rb z.rb:1: both block arg and actual block given % ruby -rripper -e 'p Ripper.sexp(STDIN.read)' < z.rb [:program, [[:method_add_block, [:method_add_arg, [:fcall, [:@ident, "m", [1, 0]]], [:arg_paren, [:args_add_block, [], [:var_ref, [:@kw, "nil", [1, 3]]]]]], [:brace_block, nil, [[:void_stmt]]]]]] % ruby -v ruby 2.2.0dev (2014-10-27 trunk 48168) [x86_64-linux] ``` ---Files-------------------------------- ripper-block_dup_check-10436.patch (2.2 KB) -- https://bugs.ruby-lang.org/
participants (1)
-
yui-knk (Kaneko Yuichiro)