Skip to content

Load StringIO before rendering parse trees - #15

Open
OskarEichler wants to merge 1 commit into
floraison:masterfrom
OskarEichler:codex/load-stringio-for-tree-printing
Open

Load StringIO before rendering parse trees#15
OskarEichler wants to merge 1 commit into
floraison:masterfrom
OskarEichler:codex/load-stringio-for-tree-printing

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Require the standard StringIO library used by Tree#to_s. A fresh Ruby process that only requires raabro currently raises NameError while printing a tree; loading unrelated libraries first can hide the missing require.

Reproduction

ruby -Ilib -rraabro -e 't = Raabro.str(:value, Raabro::Input.new("x"), "x"); puts t.to_s'

Before: uninitialized constant Raabro::Tree::StringIO. After: prints 1 :value 0,1 "x".

Verification

  • Reviewed master baseline, each individual patch, and the combined installed-release branch: existing suite passes 94 tests / 169 assertions, zero failures.
  • Ruby 4.0.6 via rbenv, Probatio 1.6.2. No new or modified test files.
  • Focused temporary repros, Ruby syntax and gem packaging checks pass. Targeted Lint reports the same 13 pre-existing warnings on baseline and fixed source, with no new warnings.
  • Consumer branch is based on installed 1.5.0 rather than importing unrelated master changes.

No production operations. Other Ruby/platform combinations were not run locally; no full supported-platform claim. Current open/closed issue/PR searches found no overlapping fix.

Breaking changes

None intended. Adds the missing explicit require for a standard/default library; public methods and tree formatting remain unchanged.

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