Merge branch master-MC1.10 into master-MC1.11

This commit is contained in:
payonel 2017-11-23 22:47:47 -08:00
commit 5d470f892a

View File

@ -246,6 +246,11 @@ class FileSystem(val fileSystem: IFileSystem, var label: Label, val host: Option
def checkHandle(args: Arguments, index: Int) = {
if (args.isInteger(index)) {
args.checkInteger(index)
} else if (args.isTable(index)) {
args.checkTable(index).get("handle") match {
case handle: Number => handle.intValue()
case _ => throw new IOException("bad file descriptor")
}
} else args.checkAny(index) match {
case handle: HandleValue => handle.handle
case _ => throw new IOException("bad file descriptor")