Skip to content

Impove tests for error messages in Array#pack, String#unpack - #1313

Merged
andrykonchin merged 1 commit into
ruby:masterfrom
trinistr:add-tests-for-pack-unknown-directives
Dec 20, 2025
Merged

Impove tests for error messages in Array#pack, String#unpack#1313
andrykonchin merged 1 commit into
ruby:masterfrom
trinistr:add-tests-for-pack-unknown-directives

Conversation

@trinistr

@trinistr trinistr commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

From #1216

Array#pack now raises ArgumentError for unknown directives. [Bug #19150]

String#unpack now raises ArgumentError for unknown directives. [Bug #19150]

Previously, 69634ef added tests, but the messages weren't full, and there was no test for a warning in String#unpack.

I've removed the comments, as the errors are no longer a future plan.

@trinistr
trinistr marked this pull request as draft December 17, 2025 17:48
@trinistr
trinistr force-pushed the add-tests-for-pack-unknown-directives branch from 7900c25 to c6aadbb Compare December 17, 2025 17:58
@trinistr trinistr changed the title Add tests with unknown directives for Array#pack, String#unpack [Ruby 3.3] Add tests with unknown directives for Array#pack, String#unpack Dec 17, 2025
@andrykonchin

Copy link
Copy Markdown
Member

Please take into account the following changes dba8426.

@trinistr

Copy link
Copy Markdown
Contributor Author

I see, tests already exist, I've missed them. I will change this PR to an improvement in messages.

@trinistr
trinistr force-pushed the add-tests-for-pack-unknown-directives branch from c6aadbb to 542c8d7 Compare December 17, 2025 18:16
@trinistr trinistr changed the title [Ruby 3.3] Add tests with unknown directives for Array#pack, String#unpack Impove tests for error messages in Array#pack, String#unpack Dec 17, 2025
@trinistr
trinistr marked this pull request as ready for review December 17, 2025 18:24
@andrykonchin

Copy link
Copy Markdown
Member

Thank you!

@andrykonchin
andrykonchin merged commit d01bf69 into ruby:master Dec 20, 2025
13 checks passed
@trinistr
trinistr deleted the add-tests-for-pack-unknown-directives branch December 21, 2025 22:31
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