Usuario anónimo
m
Protegió «Módulo:No globals» ([Editar=Solo bibliotecarios] (indefinido) [Trasladar=Solo bibliotecarios] (indefinido))
m (1 revisión importada) |
wikitves>LuchoCR m (Protegió «Módulo:No globals» ([Editar=Solo bibliotecarios] (indefinido) [Trasladar=Solo bibliotecarios] (indefinido))) |
||
Línea 2: | Línea 2: | ||
function mt.__index (t, k) | function mt.__index (t, k) | ||
if k ~= 'arg' then | if k ~= 'arg' then | ||
error(' | error('Trató de leer nil global ' .. tostring(k), 2) | ||
end | end | ||
return nil | return nil | ||
Línea 8: | Línea 8: | ||
function mt.__newindex(t, k, v) | function mt.__newindex(t, k, v) | ||
if k ~= 'arg' then | if k ~= 'arg' then | ||
error(' | --error('Trató de escribir global ' .. tostring(k), 2) | ||
end | end | ||
rawset(t, k, v) | rawset(t, k, v) | ||
end | end | ||
setmetatable(_G, mt) | setmetatable(_G, mt) |