Skip to content

Conversation

@aguspe
Copy link
Contributor

@aguspe aguspe commented Jan 2, 2026

Before, passing the wrong number of arguments (e.g., 2) to OpenSSL::PKey::EC::Group.new raised a generic "wrong number of arguments"
error.

This change updates it to show the actual argument count and the expected
options (1 or 4), making debugging easier for the user.

Example:
ArgumentError: wrong number of arguments (given 2, expected 1 or 4)

I hope it helps!

Before, passing the wrong number of arguments (e.g., 2) to
OpenSSL::PKey::EC::Group.new raised a generic "wrong number of
arguments"
error.

This change updates it to show the actual argument count and the
expected
options (1 or 4), making debugging easier for the user.

Example:
ArgumentError: wrong number of arguments (given 2, expected 1 or 4)

I hope it helps!
@rhenium
Copy link
Member

rhenium commented Jan 4, 2026

I adjusted the test so that it sits next to the existing test_ec_group.

Copy link
Member

@rhenium rhenium left a comment

Choose a reason for hiding this comment

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

Thanks!

@rhenium rhenium merged commit 1abc488 into ruby:master Jan 4, 2026
47 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.

2 participants