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
If there are nested if statesments, where the second if condition is a function with an arugment and a block, autocorrecting causes a syntax error. Given snippet test.rb
/tmp/test.rb:2: syntax error, unexpected symbol literal, expecting `do' or '{' or '('
if cond && validate :strict do
/tmp/test.rb:5: syntax error, unexpected `end', expecting end-of-input
end
If there are nested
if
statesments, where the secondif
condition is a function with an arugment and a block, autocorrecting causes a syntax error. Given snippettest.rb
and running
there is a syntax error reported by
ruby
(see below). Prior to autocorrect, there was no syntax error.Expected behavior
ruby test.rb
do not report syntax error after autocorrect. Proposed solution is to add parenthesis around arguments.Actual behavior
The source code is autocorrected to
ruby test.rb
reports syntax error:RuboCop version
The text was updated successfully, but these errors were encountered: