Skip to content

Commit faa76ae

Browse files
author
Petr Chalupa
committed
Merge pull request #373 from repinel/fix-mri-warnings
Fix some MRI 2.2.2 warnings
2 parents beab992 + 2f59478 commit faa76ae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/concurrent/atomic/atomic_fixnum.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def increment
8181
#
8282
# @return [Fixnum] the current value after decrementation
8383
def decrement
84-
synchronize { ns_set(@value -1) }
84+
synchronize { ns_set(@value - 1) }
8585
end
8686

8787
alias_method :down, :decrement

lib/concurrent/atomic/read_write_lock.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def acquire_write_lock
192192
#
193193
# @return [Boolean] true if the lock is successfully released
194194
def release_write_lock
195-
c = @Counter.update { |c| c-RUNNING_WRITER }
195+
c = @Counter.update { |counter| counter-RUNNING_WRITER }
196196
@ReadLock.broadcast
197197
@WriteLock.signal if waiting_writers(c) > 0
198198
true

0 commit comments

Comments
 (0)