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

ruby-concurrency / concurrent-ruby / #2743

04 Mar 2015 02:59AM UTC coverage: 45.152% (-50.4%) from 95.548%
#2743

push

jdantonio
Merge pull request #258 from ruby-concurrency/clock_time

Closes #256

23 of 69 new or added lines in 7 files covered. (33.33%)

1563 existing lines in 88 files now uncovered.

1425 of 3156 relevant lines covered (45.15%)

0.65 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✔
UNCOV
8
      if old_value.kind_of? Numeric
×
UNCOV
9
        while true
×
UNCOV
10
          old = get
×
11

UNCOV
12
          return false unless old.kind_of? Numeric
×
13

UNCOV
14
          return false unless old == old_value
×
15

UNCOV
16
          result = _compare_and_set(old, new_value)
×
UNCOV
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