From: Andy Keep Date: 2009-10-20T01:13:16+09:00 Subject: [ruby-core:26165] [Bug #2233] [PATCH] Ripper parsing Proc call as: f.() or f::() crashes Bug #2233: [PATCH] Ripper parsing Proc call as: f.() or f::() crashes http://redmine.ruby-lang.org/issues/show/2233 Author: Andy Keep Status: Open, Priority: Normal Category: ext, Target version: 1.9.x ruby -v: ruby 1.9.2dev (2009-10-19 trunk 25401) [x86_64-darwin10.0.0] Ripper seems to crash (with YARV and C stack trace) when trying to parse the two Proc call conveniences added to Ruby 1.9.x where the 'call' keyword is eliminated. >> Ripper.sexp("f.()") >> Ripper.sexp("f::()") The problem seems to be that Ripper is inserting 'call' in the parse stream but was using rb_intern instead of ripper_intern. The included patch calls the ripper_intern and fixes the crash. With the patch: >> Ripper.sexp("f.()") => [:program, [[:method_add_arg, [:call, [:paren, [:var_ref, [:ident, "f", [1, 0]]]], :".", :call], [:arg_paren, nil]]]] >> Ripper.sexp("f::()") => [:program, [[:method_add_arg, [:call, [:paren, [:var_ref, [:ident, "f", [1, 0]]]], :"::", :call], [:arg_paren, nil]]]] ---------------------------------------- http://redmine.ruby-lang.org