Skip to content

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

Open
rupayon123 wants to merge 1 commit into
albertalef:masterfrom
rupayon123:fix/ruby26-chain-operators-20260910
Open

rupayon123 wants to merge 1 commit into
albertalef:masterfrom
rupayon123:fix/ruby26-chain-operators-20260910

Conversation

@rupayon123

Copy link
Copy Markdown

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.

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