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

Make Lint/DeprecatedClassMethods aware of ENV.clone and ENV.dup #10824

Commits on Jul 20, 2022

  1. 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>'
    ```
    koic committed Jul 20, 2022
    Copy the full SHA
    a6bc607 View commit details
    Browse the repository at this point in the history