Skip to content

Instantly share code, notes, and snippets.

@SebastianEdwards
Created January 6, 2015 10:14
Show Gist options
  • Save SebastianEdwards/8607bacc6a00fe98d11d to your computer and use it in GitHub Desktop.
Save SebastianEdwards/8607bacc6a00fe98d11d to your computer and use it in GitHub Desktop.
Strange concurrent-ruby test behaviour
#!/usr/bin/env ruby
require 'test/unit'
require 'concurrent'
Concurrent::Future.execute { 5 * 5 }.value # => Works
class SanityTest < Test::Unit::TestCase
def test_my_sanity
assert_equal(Concurrent::Future.execute { 5 * 5 }.value, 25) # => Doesn't work
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment