Skip to content

Requiring io module should not polute the global scope #459

@botic

Description

@botic

The io module introduces ByteArray and ByteString via defineClass(). This adds both to the engine's global host objects. This prevents using const in the context of i/o.

~ > ringo -e "ByteArray();"
ReferenceError: "ByteArray" is not defined.
	at <expr>:1

~ > ringo -e "const io = require('io'); console.log(ByteArray());"
[ByteArray 0]

I don't see a chance to fix this anyway, but leave this as an issue to discuss for the future. Maybe we find a non-radical solution to this problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions