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
#! /usr/bin/env ruby# frozen_string_literal: true# Save as `demo`, then `chmod 755 demo`, and run as `./demo`.demo={a: 1,b: 2,c: 3}puts"Found."ifdemo.values_at(:a,:c)inInteger,Integer
…sParentheses`
Fixesrubocop#12134.
This PR fixes a false positive for `Style/MethodCallWithArgsParentheses`
when parentheses are used in one-line `in` pattern matching.
…heses`
Fixes#12134.
This PR fixes a false positive for `Style/MethodCallWithArgsParentheses`
when parentheses are used in one-line `in` pattern matching.
Expected behavior
I'd expect the following to not cause an error since the parenthesis are required:
Actual behavior
The following error will appear:
Letting RuboCop auto-correct the error -- by removing the parenthesis -- will result in the following syntax error:
Steps to reproduce the problem
Use the following RuboCop configuration:
Use the following script:
RuboCop version
The text was updated successfully, but these errors were encountered: