Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak document and message for Style/FlipFlop cop #6635

Merged
merged 1 commit into from
Jan 8, 2019

Commits on Jan 8, 2019

  1. Tweak document and message for Style/FlipFlop cop

    flip-flop operator is deprecated since Ruby 2.6.0.
    
    > The flip-flop syntax is deprecated. [Feature rubocop#5400]
    
    - https://github.com/ruby/ruby/blob/v2_6_0/NEWS#language-changes
    - https://bugs.ruby-lang.org/issues/5400
    
    ```console
    % cat example.rb
    (1..20).each do |x|
      puts x if (x == 5) .. (x == 10)
    end
    
    % ruby -v
    ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin17]
    
    % ruby example.rb
    example.rb:2: warning: flip-flop is deprecated
    5
    6
    7
    8
    9
    10
    ```
    
    This PR tweaks document and offense message for `Style/FlipFlop` cop.
    It will more clarify the reason for checking flip-flop operator.
    koic committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    e92f45e View commit details
    Browse the repository at this point in the history