fix: accept both readline and libedit word break characters in 3.2 tests#13
fix: accept both readline and libedit word break characters in 3.2 tests#13
Conversation
The 3.2 formula uses portable-libedit on Linux, which returns fewer basic_word_break_characters than readline. The no-YJIT builds hit this because the glibc@2.17 environment only has portable-libedit available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @jdx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses build failures in Ruby 3.2.x releases by adjusting a test assertion. The change ensures that the test for Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses a test failure in the Ruby 3.2 formula by accommodating the different basic_word_break_characters from both readline and libedit. The change from assert_equal to assert_includes is appropriate for this purpose. I have included one suggestion to improve the readability of the test code.
| assert_includes [" \t\n\"\\'`@$><=;|&{(", " \t\n`><=;|&{("], | ||
| shell_output("#{ruby} -rreadline -e 'puts Readline.basic_word_break_characters'").chomp |
There was a problem hiding this comment.
For improved readability and maintainability, consider extracting these long string literals into constants with descriptive names. This would make it clearer what each string represents (i.e., readline vs. libedit characters) and make the test easier to understand.
For example:
readline_chars = " \t\n\"\\'`@$><=;|&{("
libedit_chars = " \t\n`><=;|&{("
assert_includes [readline_chars, libedit_chars],
shell_output("#{ruby} -rreadline -e 'puts Readline.basic_word_break_characters'").chomp
Summary
The 3.2 formula uses
portable-libediton Linux, which returns fewerbasic_word_break_charactersthan readline. The no-YJIT builds fail because of this mismatch." \t\n\"\\\'+ "@$><=;|&{("" \t\n+ "`><=;|&{("`Changed
assert_equaltoassert_includesaccepting either set.This fixes all 10 failing 3.2.x release builds.
🤖 Generated with Claude Code
Note
Low Risk
Test-only change that broadens an assertion to account for platform/library differences, with no impact on build or runtime behavior.
Overview
Relaxes the Ruby 3.2 formula
testassertion forReadline.basic_word_break_charactersto accept either the readline or libedit character set (adding a short comment explaining the difference), avoiding failures on Linux builds that useportable-libedit.Written by Cursor Bugbot for commit 7aeced8. This will update automatically on new commits. Configure here.