We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 97fa0fb + 41aa058 commit cf0b250Copy full SHA for cf0b250
lib/concurrent/map.rb
@@ -197,7 +197,7 @@ def fetch_or_store(key, default_value = NULL)
197
# Insert value into map with key if key is absent in one atomic step.
198
# @param [Object] key
199
# @param [Object] value
200
- # @return [Object, nil] the value or nil when key was present
+ # @return [Object, nil] the previous value when key was present or nil when there was no key
201
def put_if_absent(key, value)
202
computed = false
203
result = compute_if_absent(key) do
0 commit comments