You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use brakeman and flay (via https://github.com/prontolabs/pronto); we are seeing an ArgumentError for a method that calls a lambda twice, something like:
deflogline(foo,bar)summarise=->(x){x.id}[summarise.call(foo)," and ",summarise.call(bar)].joinend
the last few lines of the stacktrace indicate this is a problem originating from brakeman:
4: from /Users/owen/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/brakeman-5.0.0/lib/ruby_parser/bm_sexp_processor.rb:72:in `process'
3: from /Users/owen/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/brakeman-5.0.0/lib/ruby_parser/bm_sexp_processor.rb:113:in `in_context'
2: from /Users/owen/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/brakeman-5.0.0/lib/ruby_parser/bm_sexp_processor.rb:76:in `block in process'
1: from /Users/owen/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/brakeman-5.0.0/lib/brakeman/processors/controller_processor.rb:151:in `process_call'
/Users/owen/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sexp_processor-4.15.2/lib/sexp.rb:222:in `line': setting s(:call, nil, :lambda).line nil (ArgumentError)
It's possible that this is a flay issue since I see no error if I don't require flay. However, given the error (seems) to originate from brakeman, I thought I'd raise the issue here.
Reproduction
To reproduce, use the following script that sets up a minimal rails app with brakeman/flay and the problematic module and then runs brakeman:
Background
We use
brakeman
andflay
(via https://github.com/prontolabs/pronto); we are seeing anArgumentError
for a method that calls a lambda twice, something like:the last few lines of the stacktrace indicate this is a problem originating from brakeman:
Brakeman version: 5.0.0
Rails version: 5.2.5
Ruby version: 2.7.2
It's possible that this is a
flay
issue since I see no error if I don't requireflay
. However, given the error (seems) to originate from brakeman, I thought I'd raise the issue here.Reproduction
To reproduce, use the following script that sets up a minimal rails app with brakeman/flay and the problematic module and then runs brakeman:
The output of the last line is:
The text was updated successfully, but these errors were encountered: