diff options
| author | romainsalles <romainsalles@users.noreply.github.com> | 2021-04-23 14:25:42 +0200 |
|---|---|---|
| committer | Marc-André Lafortune <github@marc-andre.ca> | 2021-04-23 12:25:00 -0400 |
| commit | 7de7d096e77ddcc6789ddea3e8aeecfaa684dccb (patch) | |
| tree | c6843a08d3c04fd4b185adb79fbad5a3d5fc80fe | |
| parent | 71ee05c9363935d0c6db01cb22edfdb2b128af4f (diff) | |
Fix wrong documentation
It doesn't return `nil` but raises an exception, as explained a few lines after
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4403
| -rw-r--r-- | hash.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -2120,7 +2120,6 @@ rb_hash_lookup(VALUE hash, VALUE key) * If +key+ is not found and no block was given, * returns +default_value+: * {}.fetch(:nosuch, :default) # => :default - * {}.fetch(:nosuch) # => nil * * If +key+ is not found and a block was given, * yields +key+ to the block and returns the block's return value: |
