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

Hash#shiftのハッシュが空かつデフォルト値が設定されている場合の説明とサンプルコードの実行結果が古かったのを修正 #2863

Merged
merged 3 commits into from
Jul 27, 2024

Commits on Dec 31, 2023

  1. Hash#shiftのハッシュが空かつデフォルト値が設定されている場合の説明とサンプルコードの実行結果が古かったのを修正

    Hash#shiftのハッシュが空かつデフォルト値が設定されている場合の説明とサンプルコードの実行結果がruby-3.3.0の内容になっていなかったため修正しました。
    
    ```
    $ docker run -it --rm rubylang/all-ruby ./all-ruby -e 'h1 = Hash.new("default value"); p h1; p h1.shift'
    
    ...
    ruby-1.4.6            {}
                          nil
    ruby-1.6.0            {}
                          "default value"
    ...
    ruby-3.1.4            {}
                          "default value"
    ruby-3.2.0-preview1   {}
                          nil
    ...
    ruby-3.3.0            {}
                          nil
    ```
    
    ```
    $ docker run -it --rm rubylang/all-ruby ./all-ruby -e 'h2 = Hash.new {|*arg| arg}; p h2; p h2.shift'
    
    ...
    ruby-1.6.8            {}
                          nil
    ruby-1.8.0            {}
                          [{}, nil]
    ...
    ruby-3.1.4            {}
                          [{}, nil]
    ruby-3.2.0-preview1   {}
                          nil
    ...
    ruby-3.3.0            {}
                          nil
    ```
    maimux2x authored Dec 31, 2023
    Configuration menu
    Copy the full SHA
    9dda1c9 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2024

  1. Configuration menu
    Copy the full SHA
    6898f4b View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2024

  1. Configuration menu
    Copy the full SHA
    5bb1ac6 View commit details
    Browse the repository at this point in the history