parser seems to blow up using 1.9 style keywords #39

Closed
mlsquires opened this Issue Apr 17, 2012 · 4 comments

Comments

Projects
None yet
4 participants
@mlsquires

Running "ruby_parse test.rb" gives:

/home/msquires/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/racc/parser.rb:351:in on_error' #<Racc::ParseError: parse error on value ":" (tCOLON)> for test.rb /home/msquires/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/racc/parser.rb:351:inon_error'
(eval):3:in _racc_do_parse_c' (eval):3:indo_parse'
/home/msquires/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:750:in `process'

Here is the test.rb file. Commenting out the "... json: @Brands" gets rid of the exception.

class FunkyController
def index
respond_to do |format|
format.json { render json: @Brands }

format.json { render (:json => @Brands) }

end

end
end

@zenspider

This comment has been minimized.

Show comment Hide comment
@zenspider

zenspider Apr 18, 2012

Member

Yup. The latest release does not parse 1.9 syntax.

Member

zenspider commented Apr 18, 2012

Yup. The latest release does not parse 1.9 syntax.

@zenspider zenspider closed this Apr 18, 2012

@htw-rails

This comment has been minimized.

Show comment Hide comment
@htw-rails

htw-rails Jul 28, 2012

is this something that will be changed? any solutions/workarounds for this?

is this something that will be changed? any solutions/workarounds for this?

@zenspider

This comment has been minimized.

Show comment Hide comment
@zenspider

zenspider Jul 28, 2012

Member

Why not look at the commits and releases?

Member

zenspider commented Jul 28, 2012

Why not look at the commits and releases?

@rking

This comment has been minimized.

Show comment Hide comment
@rking

rking Oct 13, 2012

Commenting for others who might come upon this issue:

ruby_parser 2.3.1 doesn't know much (any?) 1.9, so:

gem install ruby_parser --pre

To get 3.0, which seems to know much (all?) 1.9.

rking commented Oct 13, 2012

Commenting for others who might come upon this issue:

ruby_parser 2.3.1 doesn't know much (any?) 1.9, so:

gem install ruby_parser --pre

To get 3.0, which seems to know much (all?) 1.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment