-
-
Save emmx/db5699847b234e5938246e645dfc6cff to your computer and use it in GitHub Desktop.
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 Test | |
def callme | |
Thread.new do | |
@myvar = 123 | |
puts @myvar # Output: 123, expected: 123 | |
end | |
sleep 3 | |
Thread.new do | |
puts @myvar # Output: 123, expected: nil | |
end | |
end | |
end | |
Test.new.callme |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment