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
Post a Comment