Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iolib: fix different behavior in read function
$ lua Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio > file = "/tmp" > fd, _, code = io.open(file, "r") > _, _, ecode = fd:read(1) > print(ecode) 21 > gopher-lua throws an exception: read /tmp: is a directory stack traceback: [G]: in function 'read' extra/wrapper.lua:17: in function 'exec' <string>:1: in main chunk [G]: ? This patch results in behavior similar to the vanilla lua implementation. Closes yuin#455
- Loading branch information