Skip to content

Conversation

@anakinj
Copy link
Member

@anakinj anakinj commented Nov 13, 2025

Description

The spec against ruby-head is failing currently. Seems like it's not allowed to call .new without params anymore.

Should not cause trouble with production setups as we check for openssl before looking at the RSA capabilities.

Checklist

Before the PR can be merged be sure the following are checked:

  • There are tests for the fix or feature added/changed
  • A description of the changes and a reference to the PR has been added to CHANGELOG.md. More details in the CONTRIBUTING.md

@anakinj anakinj changed the title Fix compatibility with openssl Fix compatibility with ruby-head Nov 13, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes compatibility with ruby-head where OpenSSL::PKey::RSA.new can no longer be called without parameters. The changes replace instance-based method checks with class-level method checks.

  • Replaced .new.respond_to?(:method_name) with .method_defined?(:method_name) to check for method existence without instantiation
  • Updated version to 3.1.3 and added changelog entry

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
spec/jwt/jwk/rsa_spec.rb Updated test skip conditions to use method_defined? instead of instantiating RSA objects
lib/jwt/jwk/rsa.rb Updated production code alias condition to check method existence without instantiation
lib/jwt/version.rb Bumped TINY version from 2 to 3 for patch release
CHANGELOG.md Added v3.1.3 changelog entry documenting the fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

anakinj and others added 2 commits November 13, 2025 21:49
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
@anakinj anakinj merged commit 3a31a20 into jwt:main Nov 13, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant