Skip to content

#620: raise Fbe::Error when a fact lacks the fid property in kill_if#626

Open
SAY-5 wants to merge 1 commit into
zerocracy:masterfrom
SAY-5:620
Open

#620: raise Fbe::Error when a fact lacks the fid property in kill_if#626
SAY-5 wants to merge 1 commit into
zerocracy:masterfrom
SAY-5:620

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #620.

When a fact passed to Fbe.kill_if doesn't have the fid property, f[fid] returns nil and .first blows up with a bare NoMethodError from inside the loop. This guards the lookup with &.first and raises Fbe::Error naming the missing property instead, mirroring the check already used in Fbe.overwrite. It also stops nil silently landing in the id list when the property holds an empty array.

… kill_if

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
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.

Fbe.kill_if crashes with NoMethodError on nil when a fact lacks the fid property

1 participant