summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorromainsalles <romainsalles@users.noreply.github.com>2021-04-23 14:25:42 +0200
committerMarc-André Lafortune <github@marc-andre.ca>2021-04-23 12:25:00 -0400
commit7de7d096e77ddcc6789ddea3e8aeecfaa684dccb (patch)
treec6843a08d3c04fd4b185adb79fbad5a3d5fc80fe /hash.c
parent71ee05c9363935d0c6db01cb22edfdb2b128af4f (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
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 1498f30f5a..a36310209b 100644
--- a/hash.c
+++ b/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: