Skip to content

Commit d37231e

Browse files
authored
Fix setting AtomicReferenceImplementation on TruffleRuby
* This accidentally worked before because until Ruby 2.7 `alias_method` returns the receiver. * In Ruby 3 however, `alias_method` returns the first argument.
1 parent a9ae6de commit d37231e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ class TruffleRubyAtomicReference < TruffleRuby::AtomicReference
170170
alias_method :compare_and_swap, :compare_and_set
171171
alias_method :swap, :get_and_set
172172
end
173+
TruffleRubyAtomicReference
173174
when Concurrent.on_rbx?
174175
# @note Extends `Rubinius::AtomicReference` version adding aliases
175176
# and numeric logic.

0 commit comments

Comments
 (0)