Skip to content

fix: support symbolic chain operators on ruby 2.6 - #78

Merged
albertalef merged 1 commit into
albertalef:masterfrom
rupayon123:fix/ruby26-chain-operators-20260910
Sep 21, 2026
Merged

albertalef merged 1 commit into
albertalef:masterfrom
rupayon123:fix/ruby26-chain-operators-20260910

Conversation

@rupayon123

Copy link
Copy Markdown
Contributor

The project declares Ruby 2.6 support, but piping command objects fails there before reaching the shell: method_missing receives a Symbol and calls start_with? on it.

Normalize the method name to a string and use an anchored regex in both Command and Chainer. This preserves the existing operator classification while supporting the declared minimum Ruby version. Add regression coverage for a three-command pipeline and ordinary missing-method fallback.

Validation on Ruby 2.6.10/macOS:

  • Before: a real printf | cat | cat pipeline raises NoMethodError: undefined method start_with? for :|:Symbol.
  • After: pipeline rendering, actual execution, the bang-method DSL pipeline, and ordinary missing-method fallback all pass in a temporary directory.
  • All three edited Ruby files pass syntax checks; git diff --check passes.
  • Full RSpec/RuboCop was not run locally: the project's current Bundler/debug tooling is not available in the system Ruby environment. Upstream CI remains necessary.

No command escaping or operator allowlist change is included. Prepared with AI assistance. This is independent of PR #77's debug-failure work.

@albertalef
albertalef merged commit 1f7e427 into albertalef:master Sep 21, 2026
1 of 2 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