Skip to content

Commit

Permalink
fixed merge mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
refaktor committed May 15, 2024
1 parent 3f25ac4 commit 3b28759
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,24 +251,6 @@ func (e *RyeCtx) Set(word int, val Object) Object {
}
}

func (e *RyeCtx) Unset(word int) Object {
if _, exists := e.state[word]; !exists {
return NewError("Can't unset non-existing word in this context")
} else {
delete(e.state, word)
return NewInteger(1)
}
}

func (e *RyeCtx) Mod(word int, val Object) Object {
if _, exists := e.state[word]; exists {
e.state[word] = val
return val
} else {
return NewError("Can't mod an unset word, try using setword")
}
}

func (e *RyeCtx) Unset(word int, idxs *Idxs) Object {
if _, exists := e.state[word]; !exists {
return *NewError("Can't unset non-existing word " + idxs.GetWord(word) + " in this context")
Expand Down

0 comments on commit 3b28759

Please sign in to comment.