diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-07 10:09:27 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-07 10:09:27 -0800 |
commit | 1f3ed8210d45b035a8f76185587f97e147fc7402 (patch) | |
tree | da907b4c8aef4e26e84d0ec4b7ab3a827cdb57ad /test/readonly.lua | |
parent | 2b7ffea31612c16ab16735f6806195ab471ae409 (diff) | |
download | teliva-1f3ed8210d45b035a8f76185587f97e147fc7402.tar.gz |
delete some Lua 5.1 things
These are likely to suffer bitrot.
Diffstat (limited to 'test/readonly.lua')
-rw-r--r-- | test/readonly.lua | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/test/readonly.lua b/test/readonly.lua deleted file mode 100644 index 85c0b4e..0000000 --- a/test/readonly.lua +++ /dev/null @@ -1,12 +0,0 @@ --- make global variables readonly - -local f=function (t,i) error("cannot redefine global variable `"..i.."'",2) end -local g={} -local G=getfenv() -setmetatable(g,{__index=G,__newindex=f}) -setfenv(1,g) - --- an example -rawset(g,"x",3) -x=2 -y=1 -- cannot redefine `y' |