Skip to content

Commit eda80bf

Browse files
committed
Fixed Yard errors.
1 parent 664396b commit eda80bf

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

lib/concurrent/atomic/atomic_boolean.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class MutexAtomicBoolean
1414
#
1515
# Creates a new `AtomicBoolean` with the given initial value.
1616
#
17-
# @param [Boolean] init the initial value
17+
# @param [Boolean] initial the initial value
1818
def initialize(initial = false)
1919
@value = !!initial
2020
@mutex = Mutex.new

lib/concurrent/collection/blocking_ring_buffer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def full?
3131
@mutex.synchronize { @buffer.full? }
3232
end
3333

34-
# @param [Object] value. This methods blocks until an empty slot is available
34+
# @param [Object] value the value to be inserted
3535
# @return [Boolean] true if value has been inserted, false otherwise
3636
def put(value)
3737
@mutex.synchronize do

lib/concurrent/delay.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def value
8181

8282
# reconfigures the block returning the value if still #incomplete?
8383
# @yield the delayed operation to perform
84-
# @returns [true, false] if success
84+
# @return [true, false] if success
8585
def reconfigure(&block)
8686
mutex.lock
8787
raise ArgumentError.new('no block given') unless block_given?

lib/concurrent/ivar.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,16 @@ def add_observer(observer = nil, func = :update, &block)
8383
end
8484

8585
# Set the `IVar` to a value and wake or notify all threads waiting on it.
86-
# @param [Object] the value to store in the `IVar`
86+
#
87+
# @param [Object] value the value to store in the `IVar`
8788
# @raise [MultipleAssignmentError] if the `IVar` has already been set or otherwise completed
8889
def set(value)
8990
complete(true, value, nil)
9091
end
9192

9293
# Set the `IVar` to failed due to some error and wake or notify all threads waiting on it.
93-
# @option [Object] reason for the failure
94+
#
95+
# @param [Object] reason for the failure
9496
# @raise [MultipleAssignmentError] if the `IVar` has already been set or otherwise completed
9597
def fail(reason = StandardError.new)
9698
complete(false, nil, reason)

lib/concurrent/obligation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def incomplete?
4242
[:unscheduled, :pending].include? state
4343
end
4444

45-
# @returns [Object] see Dereferenceable#deref
45+
# @return [Object] see Dereferenceable#deref
4646
def value(timeout = nil)
4747
wait timeout
4848
deref
@@ -65,7 +65,7 @@ def no_error!(timeout = nil)
6565
end
6666

6767
# @raise [Exception] when #rejected? it raises #reason
68-
# @returns [Object] see Dereferenceable#deref
68+
# @return [Object] see Dereferenceable#deref
6969
def value!(timeout = nil)
7070
wait(timeout)
7171
if rejected?

0 commit comments

Comments
 (0)