Skip to content

Commit 52f0ee4

Browse files
trinistreregon
authored andcommitted
Fix mistakes in MVar documentation
1 parent c8f0bae commit 52f0ee4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ There are a few guidelines which we follow when adding features. Consider that s
6666

6767
#### Write Documentation
6868

69-
Document any external behavior in the [README](README.md).
69+
Document any external behavior in the [README](../README.md).
7070

7171
#### Commit Changes
7272

@@ -106,7 +106,7 @@ git push origin my-feature-branch -f
106106

107107
#### Update CHANGELOG
108108

109-
Update the [CHANGELOG](CHANGELOG.md) with a description of what you have changed.
109+
Update the [CHANGELOG](../CHANGELOG.md) with a description of what you have changed.
110110

111111
#### Check on Your Pull Request
112112

lib/concurrent-ruby/concurrent/mvar.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Concurrent
99
# queue of length one, or a special kind of mutable variable.
1010
#
1111
# On top of the fundamental `#put` and `#take` operations, we also provide a
12-
# `#mutate` that is atomic with respect to operations on the same instance.
12+
# `#modify` that is atomic with respect to operations on the same instance.
1313
# These operations all support timeouts.
1414
#
1515
# We also support non-blocking operations `#try_put!` and `#try_take!`, a
@@ -87,7 +87,7 @@ def borrow(timeout = nil)
8787
@mutex.synchronize do
8888
wait_for_full(timeout)
8989

90-
# if we timeoud out we'll still be empty
90+
# If we timed out we'll still be empty
9191
if unlocked_full?
9292
yield @value
9393
else
@@ -116,10 +116,10 @@ def put(value, timeout = nil)
116116
end
117117

118118
# Atomically `take`, yield the value to a block for transformation, and then
119-
# `put` the transformed value. Returns the transformed value. A timeout can
119+
# `put` the transformed value. Returns the pre-transform value. A timeout can
120120
# be set to limit the time spent blocked, in which case it returns `TIMEOUT`
121121
# if the time is exceeded.
122-
# @return [Object] the transformed value, or `TIMEOUT`
122+
# @return [Object] the pre-transform value, or `TIMEOUT`
123123
def modify(timeout = nil)
124124
raise ArgumentError.new('no block given') unless block_given?
125125

0 commit comments

Comments
 (0)