mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix wrong documentation
It doesn't return `nil` but raises an exception, as explained a few lines after
This commit is contained in:
parent
71ee05c936
commit
7de7d096e7
Notes:
git
2021-04-24 01:25:35 +09:00
1 changed files with 0 additions and 1 deletions
1
hash.c
1
hash.c
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue