Skip to content

Error on <non-js-value> == <js-value> #395

Closed
@krmbn0576

Description

@krmbn0576

Code:

require "js"

p 24 == JS.eval("return 24;")

Result:

<anonymous>': eval:3:in `==': wrong argument type Integer (expected jsvalue) (TypeError)
eval:3:in `=='
eval:3:in `<main>'

Hmmm the equal operator causing errors is so inconvenient and unpredictable.
Can you return the value or at least improve it to a clear error message?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions