Class: Hecks::Bluebook::Expression::Resolver::MatchesRegex
- Inherits:
-
Struct
- Object
- Struct
- Hecks::Bluebook::Expression::Resolver::MatchesRegex
- Defined in:
- lib/hecks/bluebook/expression/resolver.rb
Overview
UPDATE 2026-08-27: every "vendored addition, not (yet) upstream hecks" comment on this file's own MatchesRegex/Presence/Split/ First/Last/StartsWith/EndsWith below (plus ArrayLiteral above) described a REAL gap, found the hard way, in the history each comment tells — and that history stays exactly as written, on purpose. What changed is the PRESENT TENSE claim "not (yet) upstream": a review of this exact migration found these eight symbols had working Ruby parse/interpret arms but had NEVER gone through Propose -> Render -> Admit (lib/hecks/grammar/expression_operators.json) the way every other operator here has — a closed-vocabulary guard (spec/operator_conformance_spec.rb) built entirely over TABLES structurally could not see hand-coded Struct/parse/interpret additions, so eight operators ran in Ruby, admitted nowhere, invisible to the one guard whose whole job was "reads in every target." All eight are now ledger-admitted for real, with full Rust kernel parity (rust/src/kernel/expression_operators/ pattern_match,presence,text,positional.rs) — the two-tier gap is closed, not merely tracked.
receiver.match?(/pattern/) -- vendored addition, not (yet)
upstream hecks (migration plan task 8): confirmed the
SINGLE most impactful corpus-wide dispatch-time gap of the
whole migration -- .match?(regex) appears in nearly every
value_object's format-validation rule across every corpus
this migration touched (email/phone/ISO-8601-timestamp/zip
patterns, dozens of files), and had NO parse support at all:
it fell all the way through to the Lookup catch-all below,
which tried to split the ENTIRE ".match?(/\A\d5\z/)" text
on "." as if it were a dotted attribute path, and crashed with
an opaque "no implicit conversion of Symbol into Integer"
somewhere downstream -- confirmed live via a real dispatch,
not validate (validate never evaluates a predicate body).
receiver still needs its own parse (it may itself be a
dotted lookup, e.g. some_field.match?(...)), the pattern
text is taken as-is between the slashes (a Ruby Regexp literal,
not the evaluator's own mini-grammar -- there is nothing to
recurse into).
Instance Attribute Summary collapse
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#receiver ⇒ Object
Returns the value of attribute receiver.
Instance Attribute Details
#flags ⇒ Object
Returns the value of attribute flags
99 100 101 |
# File 'lib/hecks/bluebook/expression/resolver.rb', line 99 def flags @flags end |
#pattern ⇒ Object
Returns the value of attribute pattern
99 100 101 |
# File 'lib/hecks/bluebook/expression/resolver.rb', line 99 def pattern @pattern end |
#receiver ⇒ Object
Returns the value of attribute receiver
99 100 101 |
# File 'lib/hecks/bluebook/expression/resolver.rb', line 99 def receiver @receiver end |