Skip to content

Award variable substitution silently returns nil/empty for undefined variables #579

Description

@sdghsdkjlas27-dotcom

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions