forked from rubocop/rubocop
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
Lint/DeprecatedClassMethods
aware of ENV.clone
and ENV.dup
Follow up ruby/ruby#4557. This PR makes `Lint/DeprecatedClassMethods` aware of `ENV.clone` and `ENV.dup`. This update is based on the following behaviors: ```console % ruby -v ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin19] % ruby -we 'ENV.clone' -e:1: warning: ENV.clone is deprecated; use ENV.to_h instead % ruby -e 'ENV.dup' -e:1:in `dup': Cannot dup ENV, use ENV.to_h to get a copy of ENV as a hash (TypeError) from -e:1:in `<main>' ```
- Loading branch information
Showing
3 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog/fix_make_lint_deprecated_class_methods_aware_of_env_clone_and_dup.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [#10824](https://github.com/rubocop/rubocop/pull/10824): Make `Lint/DeprecatedClassMethods` aware of `ENV.clone` and `ENV.dup`. ([@koic][]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters