Skip to content

test_bn.rb: Error: test_ractor(OpenSSL::TestBN): NoMethodError: undefined method 'take' for an instance of Ractor #897

Closed

Description

@junaruga

I executed the CI on the latest master branch commit 73b866d. And I see the following cases fail with the following error.

  • ubuntu-latest head
  • macos-latest head
  • windows-latest head
  • windows-latest ucrt

https://github.com/junaruga/ruby-openssl/actions/runs/15421592467/job/43397863260

1) Error: test_ractor(OpenSSL::TestBN): NoMethodError: undefined method 'take' for an instance of Ractor
/home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_bn.rb:351:in 'OpenSSL::TestBN#test_ractor'
     348:   if respond_to?(:ractor)
     349:     ractor
     350:     def test_ractor
  => 351:       assert_equal(@e1, Ractor.new { OpenSSL::BN.new("999") }.take)
     352:       assert_equal(@e3, Ractor.new { OpenSSL::BN.new("\a\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF", 2) }.take)
     353:       assert_equal("999", Ractor.new(@e1) { |e1| e1.to_s }.take)
     354:       assert_equal("07FFFFFFFFFFFFFFFFFFFFFFFFFF", Ractor.new(@e3) { |e3| e3.to_s(16) }.take)
Error: NoMethodError: undefined method 'take' for an instance of Ractor
/home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_bn.rb:351:in 'OpenSSL::TestBN#test_ractor'

It seems that the the Ractor#take was removed at the commit ruby/ruby@ef2bb61.

The ruby/prism fixed such an issue at the commit ruby/prism@f5ded51.

Activity

  1. junaruga commented on Jun 3, 2025

    @junaruga
    MemberAuthor

    I see @rhenium has already been working on the #896 to fix this issue. Thanks!

  2. linked a pull request that will close this issuetest/openssl/test_bn.rb: use Ractor#value #896on Jun 5, 2025
  3. junaruga commented on Jun 5, 2025

    @junaruga
    MemberAuthor

    This issue was fixed at the commit f860a26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions