[ create a new paste ] login | about

Link: http://codepad.org/NBMuK1s1    [ raw code | output | fork ]

Lua, pasted on May 8:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local stringmt = getmetatable("")
function stringmt:__index(k)
        return string[k]
end

local function f1()
        print(("Test"):upper())
end
f1()

local function f2()
        _ENV = {string={upper = string.lower}, print=print}
        print(("Test"):upper())
end
f2()


Output:
1
2
TEST
TEST


Create a new paste based on this one


Comments: