Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse error on value ":" (tCOLON) #645

Closed
liamdawson opened this issue Mar 31, 2015 · 4 comments
Closed

Parse error on value ":" (tCOLON) #645

liamdawson opened this issue Mar 31, 2015 · 4 comments

Comments

@liamdawson
Copy link

The following line of code causes an issue in brakeman:

has_many :security_questions, autosave: false

brakeman 3.0.2, ruby_parser 3.6.5

ruby -c file.rb
Syntax OK

Unlike similar bugs (seattlerb/ruby_parser#143), it isn't broken over multiple lines.

@presidentbeef
Copy link
Owner

Hi Liam,

I don't think that's the problem:

$ irb
1.9.3-p484 :001 > require 'ruby_parser'
 => true
1.9.3-p484 :002 > RubyParser.new.parse "has_many :security_questions, autosave: false"
 => s(:call, nil, :has_many, s(:lit, :security_questions), s(:hash, s(:lit, :autosave), s(:false)))

I can't reproduce any issues via Brakeman either.

@liamdawson
Copy link
Author

Interesting. I commented all the code after the offending line, and it ran fine. I'll see if I can narrow it down. Guessing I should redirect this to the ruby_parser repo?

@liamdawson
Copy link
Author

Ah, the issue seems to be some regular expressions later in the file. I've filed it at seattlerb/ruby_parser#182

@presidentbeef
Copy link
Owner

Going to close this, since it's not really about Brakeman.

Repository owner locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants