ruby - What does "(...) interpreted as grouped expression" mean? -


i'm using ruby linter in atom , lines gives following warning:

(...) interpreted grouped expression 

an example of line get's warning this:

elsif not (params[:vacancy].nil? or params[:vacancy]['company_id'].nil? or params[:vacancy]['company_id'] == "0" ) 

how should line improved make warning go away?

the warning

(...) interpreted grouped expression 

and means says: in ruby, parentheses can used 3 purposes, expression grouping, parameter lists , argument lists. warning emitted when ruby thinks want argument list wrote grouped expression instead. common cause whitespace between name of message , argument list in message send this:

foo.bar (1, 2) 

this interpreted not argument list message send, rather grouped expression, which, in particular case, syntaxerror.

in particular case, warning seems false positive.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -