Skip to content

Commit

Permalink
Update doc for Lint/FlipFlop
Browse files Browse the repository at this point in the history
This PR updates doc for `Lint/FlipFlop` based
on the change to flip-flop in Ruby 2.7.
  • Loading branch information
koic committed Oct 26, 2020
1 parent bfeec38 commit d5b2229
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions docs/modules/ROOT/pages/cops_lint.adoc
Expand Up @@ -1534,8 +1534,14 @@ end
| -
|===

This cop looks for uses of flip-flop operator.
flip-flop operator is deprecated since Ruby 2.6.0.
This cop looks for uses of flip-flop operator
based on the Ruby Style Guide.

Here is the history of flip-flops in Ruby.
flip-flop operator is deprecated in Ruby 2.6.0 and
the deprecation has been reverted by Ruby 2.7.0 and
backported to Ruby 2.6.
See: https://bugs.ruby-lang.org/issues/5400

=== Examples

Expand Down
10 changes: 8 additions & 2 deletions lib/rubocop/cop/lint/flip_flop.rb
Expand Up @@ -3,8 +3,14 @@
module RuboCop
module Cop
module Lint
# This cop looks for uses of flip-flop operator.
# flip-flop operator is deprecated since Ruby 2.6.0.
# This cop looks for uses of flip-flop operator
# based on the Ruby Style Guide.
#
# Here is the history of flip-flops in Ruby.
# flip-flop operator is deprecated in Ruby 2.6.0 and
# the deprecation has been reverted by Ruby 2.7.0 and
# backported to Ruby 2.6.
# See: https://bugs.ruby-lang.org/issues/5400
#
# @example
# # bad
Expand Down

0 comments on commit d5b2229

Please sign in to comment.