Skip to content

different behavior in io.popen function #459

@0x501D

Description

@0x501D

In the C implementation of the Lua interpreter, in the io.popen function the second argument can be nil:

Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio:

> x,y = io.popen("ls", nil)
> assert(x)
> assert(y == nil)
> 

Gopher lua throws an exception.
gopher-lua (current master):

bad argument #2 to popen (string expected, got nil)

affected public project

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions