@@ -8,7 +8,7 @@ class AtomicMarkableReference < ::Concurrent::Synchronization::Object
88 # @!macro [attach] atomic_markable_reference_method_initialize
99 def initialize ( value = nil , mark = false )
1010 super
11- @reference = AtomicReference . new ImmutableArray [ value , mark ]
11+ @Reference = AtomicReference . new ImmutableArray [ value , mark ]
1212 ensure_ivar_visibility!
1313 end
1414
@@ -30,7 +30,7 @@ def initialize(value = nil, mark = false)
3030 def compare_and_set ( expected_val , new_val , expected_mark , new_mark )
3131 # Memoize a valid reference to the current AtomicReference for
3232 # later comparison.
33- current = @reference . get
33+ current = @Reference . get
3434 curr_val , curr_mark = current
3535
3636 # Ensure that that the expected values match.
@@ -44,7 +44,7 @@ def compare_and_set(expected_val, new_val, expected_mark, new_mark)
4444
4545 prospect = ImmutableArray [ new_val , new_mark ]
4646
47- @reference . compare_and_set current , prospect
47+ @Reference . compare_and_set current , prospect
4848 end
4949
5050 # @!macro [attach] atomic_markable_reference_method_get
@@ -53,7 +53,7 @@ def compare_and_set(expected_val, new_val, expected_mark, new_mark)
5353 #
5454 # @return [ImmutableArray] the current reference and marked values
5555 def get
56- @reference . get
56+ @Reference . get
5757 end
5858
5959 # @!macro [attach] atomic_markable_reference_method_value
@@ -62,7 +62,7 @@ def get
6262 #
6363 # @return [Object] the current value of the reference
6464 def value
65- @reference . get [ 0 ]
65+ @Reference . get [ 0 ]
6666 end
6767
6868 # @!macro [attach] atomic_markable_reference_method_mark
@@ -71,7 +71,7 @@ def value
7171 #
7272 # @return [Boolean] the current marked value
7373 def mark
74- @reference . get [ 1 ]
74+ @Reference . get [ 1 ]
7575 end
7676 alias_method :marked? , :mark
7777
@@ -86,7 +86,7 @@ def mark
8686 # @return [ImmutableArray] both the new value and the new mark
8787 def set ( new_val , new_mark )
8888 ImmutableArray [ new_val , new_mark ] . tap do |pair |
89- @reference . set pair
89+ @Reference . set pair
9090 end
9191 end
9292
0 commit comments