In Bill#line (award.rb line 359), the regex substitution @vars[Regexp.last_match[1].to_sym] returns nil for undefined variables, and Ruby's string interpolation converts nil to empty string. In Bylaw#line (line 446), @lets[Regexp.last_match[1].to_sym] returns nil which gets wrapped in "nil". Typos in variable names silently produce empty text or "nil" instead of raising an error.
REPRODUCTION: Create a bylaw with (give "text") where typo_var is not defined. The greeting will contain empty text.
IMPACT: Award descriptions silently lose content or display "nil", making it impossible to understand why certain awards appear incomplete.
In Bill#line (award.rb line 359), the regex substitution @vars[Regexp.last_match[1].to_sym] returns nil for undefined variables, and Ruby's string interpolation converts nil to empty string. In Bylaw#line (line 446), @lets[Regexp.last_match[1].to_sym] returns nil which gets wrapped in "nil". Typos in variable names silently produce empty text or "nil" instead of raising an error.
REPRODUCTION: Create a bylaw with (give "text") where typo_var is not defined. The greeting will contain empty text.
IMPACT: Award descriptions silently lose content or display "nil", making it impossible to understand why certain awards appear incomplete.