From: "shia (Sangyong Sim) via ruby-core" Date: 2024-01-09T09:08:58+00:00 Subject: [ruby-core:116104] [Ruby master Bug#20167] Code execution isn't recorded in Ractor Issue #20167 has been reported by shia (Sangyong Sim). ---------------------------------------- Bug #20167: Code execution isn't recorded in Ractor https://bugs.ruby-lang.org/issues/20167 * Author: shia (Sangyong Sim) * Status: Open * Priority: Normal * ruby -v: 3.3.0 * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ## reproduction code ```ruby # frozen-string-literal: true require "coverage" Coverage.start require_relative "./some_lib" # # some_lib.rb # class C # def hoge(i) # i # end # end r = Ractor.new do loop do v = Ractor.receive ret_v = C.new.hoge(v) Ractor.yield ret_v end end 2.times do |i| r << i r.take end Coverage.result.each do |file, lines| if file.include?("some_ractor_lib") if lines == [1, 1, 2, nil, nil] puts "OK" else puts "expected: [1, 1, 2, nil, nil]" puts "actual: #{lines.inspect}" end end end ``` ## Target ruby version 3.2.0+ affected -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/