Skip to content

Commit

Permalink
Avoid require of already-loaded library
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Feb 10, 2025
1 parent e961a16 commit 849ab2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testes/pluto/basic.pluto
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ do
local function recursive_enc()
local t = {}
t.t = t
return require"json".encode(t)
return json.encode(t)
end
assert(select(2, pcall(recursive_enc)) == "C stack overflow")

Expand All @@ -1594,7 +1594,7 @@ do
prev_t = t
end
end
return require"json".encode(root)
return json.encode(root)
end
assert(select(2, pcall(overflow_enc)) == "C stack overflow")
end
Expand Down

0 comments on commit 849ab2c

Please sign in to comment.