• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ruby-concurrency / concurrent-ruby / #2938

11 Aug 2014 02:52PM UTC coverage: 45.217% (-45.4%) from 90.621%
#2938

push

jdantonio
Removed Rbx from Travis allowed failures list.

1366 of 3021 relevant lines covered (45.22%)

0.66 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/lib/concurrent/atomic_reference/numeric_cas_wrapper.rb
1
module Concurrent
1✔
2

3
  # Special "compare and set" handling of numeric values.
4
  module AtomicNumericCompareAndSetWrapper
1✔
5

6
    # @!macro atomic_reference_method_compare_and_set
7
    def compare_and_set(old_value, new_value)
1✔
8
      if old_value.kind_of? Numeric
×
9
        while true
×
10
          old = get
×
11

12
          return false unless old.kind_of? Numeric
×
13

14
          return false unless old == old_value
×
15

16
          result = _compare_and_set(old, new_value)
×
17
          return result if result
×
18
        end
19
      else
20
        _compare_and_set(old_value, new_value)
×
21
      end
22
    end
23
    alias_method :compare_and_swap, :compare_and_set
1✔
24
  end
25
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc