lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Why not the following function instead:
> 
> function newproxy2( meta, env ) -- returns a userdata with the given metatable and environment (user value in 5.2)

Then you can write the following:

  falsefile = newproxy2(getmetatable(io.stdin), {})
  io.read(falsefile)

and crash the io library.

-- Roberto