[Bug #631] ripper does not follow change of parse.y


#1

Bug #631: ripper does not follow change of parse.y
http://redmine.ruby-lang.org/issues/show/631

e$B5/I<<Te(B: Koichi Kimura
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
e$B%+%F%4%je(B: ext, Target version: 1.9.x

-> e$B$r;H$C$?%9%F!<%H%a%s%H$re(B ripper e$B$,@5$7$/2r@O$G$-$^$;$s!#e(B

irb(main):001:0> RUBY_RELEASE_DATE
=> “2008-10-10”
irb(main):002:0> require ‘ripper’
=> true
irb(main):004:0> Ripper.lex(“lambda{|x| xx}.call(3)")
=> [[[1, 0], :on_ident, “lambda”], [[1, 6], :on_lbrace, “{”], [[1, 7],
:on_op, "
|"], [[1, 8], :on_ident, “x”], [[1, 9], :on_op, “|”], [[1, 10], :on_sp, " "], [[
1, 11], :on_ident, “x”], [[1, 12], :on_op, "
”], [[1, 13], :on_ident,
“x”], [[1,
14], :on_rbrace, “}”], [[1, 15], :on_period, “.”], [[1, 16], :on_ident,
“call”]
, [[1, 20], :on_lparen, “(”], [[1, 21], :on_int, “3”], [[1, 22],
:on_rparen, “)”
]]
irb(main):005:0> Ripper.lex("->(x){xx}.call(3)")
=> [[[1, 0], :on_tlambda, “->”], [[1, 2], :on_lparen, “(”], [[1, 3],
:on_ident,
“x”], [[1, 4], :on_rparen, “)”], [[1, 5], :on_lbrace, “{”], [[1, 6],
:on_ident,
“x”], [[1, 7], :on_op, "
"], [[1, 8], :on_ident, “x”], [[1, 9],
:on_rbrace, “}”]
]

-> e$B$r;H$C$?$[$&$OL5L>%V%m%C%/$NJD$8%V%l!<%9$G2r@O$,;_$^$C$F$^$9!#e(B

parse.y e$B$K<j$rF~$l$kI,MW$,$"$k$N$G$Oe(B?
primary e$B"*e(B tLAMBDA lambda e$B$N$"$?$j$H$+!#e(B


#2

e$B%A%1%C%He(B #631 e$B$,99?7$5$l$^$7$?!#e(B (by Yukihiro M.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r19908.

http://redmine.ruby-lang.org/issues/show/631