Skip to content

Commit

Permalink
[Doc] Tweak the doc for Lint/DeprecatedConstants
Browse files Browse the repository at this point in the history
Follow up #10209
  • Loading branch information
koic committed Nov 17, 2022
1 parent 12fa5e1 commit 135dc17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rubocop/cop/lint/deprecated_constants.rb
Expand Up @@ -14,20 +14,23 @@ module Lint
# Alternative: 'alternative_value'
# DeprecatedVersion: 'deprecated_version'
#
# By default, `NIL`, `TRUE`, `FALSE` and `Random::DEFAULT` are configured.
# By default, `NIL`, `TRUE`, `FALSE`, `Net::HTTPServerException, and `Random::DEFAULT`
# are configured.
#
# @example
#
# # bad
# NIL
# TRUE
# FALSE
# Net::HTTPServerException
# Random::DEFAULT # Return value of Ruby 2 is `Random` instance, Ruby 3.0 is `Random` class.
#
# # good
# nil
# true
# false
# Net::HTTPClientException
# Random.new # `::DEFAULT` has been deprecated in Ruby 3, `.new` is compatible with Ruby 2.
#
class DeprecatedConstants < Base
Expand Down

0 comments on commit 135dc17

Please sign in to comment.