-
-
Save didactic-drunk/a7e6bb358e45cfa1e9f5f074cc415b37 to your computer and use it in GitHub Desktop.
Array of Atomics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class C | |
end | |
ary = Array(Atomic(C?)).new(4, Atomic(C?).new(nil)) | |
ary[0].set C.new | |
# Should not be nil | |
p ary[0].get | |
p ary[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment