ruby-changes:65943
From: romainsalles <ko1@a...>
Date: Sat, 24 Apr 2021 01:25:24 +0900 (JST)
Subject: [ruby-changes:65943] 7de7d096e7 (master): Fix wrong documentation
https://git.ruby-lang.org/ruby.git/commit/?id=7de7d096e7 From 7de7d096e77ddcc6789ddea3e8aeecfaa684dccb Mon Sep 17 00:00:00 2001 From: romainsalles <romainsalles@u...> Date: Fri, 23 Apr 2021 14:25:42 +0200 Subject: Fix wrong documentation It doesn't return `nil` but raises an exception, as explained a few lines after --- hash.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hash.c b/hash.c index 1498f30..a363102 100644 --- a/hash.c +++ b/hash.c @@ -2120,7 +2120,6 @@ rb_hash_lookup(VALUE hash, VALUE key) https://github.com/ruby/ruby/blob/trunk/hash.c#L2120 * 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: -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/