Skip to content

fix: accept both readline and libedit word break characters in 3.2 tests#13

Merged
jdx merged 1 commit intomainfrom
fix-32-readline-test
Feb 10, 2026
Merged

fix: accept both readline and libedit word break characters in 3.2 tests#13
jdx merged 1 commit intomainfrom
fix-32-readline-test

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Feb 10, 2026

Summary

The 3.2 formula uses portable-libedit on Linux, which returns fewer basic_word_break_characters than readline. The no-YJIT builds fail because of this mismatch.

  • readline: " \t\n\"\\\' + "@$><=;|&{("
  • libedit: " \t\n + "`><=;|&{("`

Changed assert_equal to assert_includes accepting 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 test assertion for Readline.basic_word_break_characters to accept either the readline or libedit character set (adding a short comment explaining the difference), avoiding failures on Linux builds that use portable-libedit.

Written by Cursor Bugbot for commit 7aeced8. This will update automatically on new commits. Configure here.

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>
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @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 Readline.basic_word_break_characters correctly passes on systems using libedit (which provides a different set of characters than readline), thereby resolving compatibility issues and allowing all affected builds to succeed.

Highlights

  • Test Fix for Ruby 3.2 Builds: Modified the ruby-32 test to use assert_includes instead of assert_equal when checking Readline.basic_word_break_characters. This change accommodates the difference in word break characters returned by readline and libedit (used by portable-libedit on Linux).
  • Compatibility Enhancement: The adjustment ensures that the test passes correctly on systems where libedit is used, which provides a slightly different set of basic word break characters compared to readline.
  • Resolved Build Failures: This fix addresses and resolves all 10 previously failing 3.2.x release builds caused by this character set mismatch.
Changelog
  • Abstract/jdx-ruby-32.rb
    • Updated the assertion for Readline.basic_word_break_characters to accept both readline and libedit character sets.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +257 to 258
assert_includes [" \t\n\"\\'`@$><=;|&{(", " \t\n`><=;|&{("],
shell_output("#{ruby} -rreadline -e 'puts Readline.basic_word_break_characters'").chomp
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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

@jdx jdx merged commit e177cc4 into main Feb 10, 2026
10 checks passed
@jdx jdx deleted the fix-32-readline-test branch February 10, 2026 03:48
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