File: test-ractor.rb

package info (click to toggle)
ruby-enumerable-statistics 2.0.7%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,132 kB
  • sloc: ruby: 2,220; ansic: 1,921; javascript: 408; makefile: 8; sh: 4
file content (12 lines) | stat: -rw-r--r-- 227 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
class RactorTest < Test::Unit::TestCase
  def setup
    omit("require Ractor") unless defined? Ractor
  end

  test("Array#mean") do
    r = Ractor.new do
      [1, 2, 3, 4].mean
    end
    assert_equal(2.5, r.take)
  end
end