Created
April 25, 2014 19:57
-
-
Save LPGhatguy/11301219 to your computer and use it in GitHub Desktop.
Creates an insane development environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--usage: require("oops") | |
local rawset, tostring = rawset, tostring | |
local meta = { | |
__mode = "v", | |
__index = function(self, index) | |
return tostring(index) | |
end, | |
__newindex = function(self, index, value) | |
rawset(self, tostring(index):upper(), value) | |
end | |
} | |
setmetatable(getfenv(1), meta) | |
setmetatable(_G, meta) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment