Skip to content

Fix disabled named color reflection - #146

Open
OskarEichler wants to merge 1 commit into
ku1ik:masterfrom
OskarEichler:codex/rainbow-null-reflection
Open

Fix disabled named color reflection#146
OskarEichler wants to merge 1 commit into
ku1ik:masterfrom
OskarEichler:codex/rainbow-null-reflection

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Make disabled presenters accurately report their supported named color methods, and add disabled-mode parity for the default named color introduced on current master.

Reproduction

Rainbow::Wrapper.new(false).wrap('x').aqua works, but respond_to?(:aqua) returns false and method(:aqua) raises. Ruby passes the include_private boolean to respond_to_missing?; treating that boolean as a normal method argument makes the current args.empty? guard fail.

Verification

  • Existing suite: 220 examples, 0 failures on Ruby 3.2.11 and 4.0.6.
  • RuboCop: 15 files, 0 offenses on both Rubies.
  • External model: 1,325 reflection, method lookup, invocation, unknown-method, privacy and wrong-arity checks per Ruby across all ANSI/X11 names and string/symbol lookup forms.
  • Rebuilt gem: 14 expected files and successful packaged loads on both Rubies.
  • No test files changed.

Compatibility

No breaking change. Previously supported disabled-mode calls now expose the Ruby reflection contract they already implied.

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