Skip to content

Commit

Permalink
FIX: avoid an error when loading an unset value
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Dec 24, 2023
1 parent 7a9e110 commit aa227fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/mezz/sys-load.reb
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ load: function [
header
empty? data
1 < length? data
][data: first data]
][set/any 'data first data]
]
:data
]
Expand Down
3 changes: 3 additions & 0 deletions src/tests/units/load-test.r3
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ Rebol [
e/near = "(line 4) 4line"
]

--test-- "loading an unset value"
--assert unset? try [load "#[unset]"] ;- no error

===end-group===

===start-group=== "find-script native"
Expand Down

0 comments on commit aa227fc

Please sign in to comment.