Open lindluni opened 1 year ago
The problem in uploads_controller.rb can be reduced to the following and seems to be caused by the trailing key:
parameter without value. The parser somehow expects a value or a ;
even though the value is optional.
begin
key = 10
foo key:
rescue => e
end
The problem in delete_expired_sessions_job.rb can be reduced to the following and seems to be caused by the parser interpreting ...
as forward parameters as if the code was written like def foo ... 3 end
.
def foo
... 3
end
While working on updating our usage of CodeQL we are seeing extraction errors on two files. Both say there are syntax errors in the file, but neither present with syntax issues when checked with
ruby -c
or withrubocop
. One of them is being flagged on a Ruby construct, the...
operator, that has existed since Ruby 2.6. Any thoughts on why we are flagging these as syntax errors during extraction, but ruby itself is saying the files are valid, these are the two files:And this is the error we are seeing: