Skip to content

Error in passing string value to function of type NativeFunctionData #633

Closed

Description

@elasmojs

Hi

The dev branch seems pass string values along with quotes when passing arguments to functions of type NativeFunctionData

thanks

Activity

  1. added
    A-Bug
    on Aug 14, 2020
  2. HalidOdat commented on Aug 14, 2020

    @HalidOdat
    Member

    The dev branch seems pass string values along with quotes when passing arguments to functions of type NativeFunctionData

    Could you give an example of this?

  3. elasmojs commented on Aug 14, 2020

    @elasmojs
    ContributorAuthor

    Could you give an example of this?

    I just issued a pull request for #446 (#634) , it has the snippet in modulehandler.rs line 44
    hope that helps

  4. HalidOdat commented on Aug 15, 2020

    @HalidOdat
    Member

    This is not a bug, when you call value.to_string() it calls value Display trait which puts quotes around strings. instead use Interperter::to_string(value) after #625 this should be more intuitive. since to display it you have to call Value::display() and to turn the value to a string you call Value::to_string(ctx).

  5. removed
    A-Bug
    on Aug 15, 2020
  6. self-assigned this
    on Aug 15, 2020
  7. added
    A-API
    A-Enhancement
    on Aug 15, 2020
  8. added this to the v0.10.0 milestone on Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-APIA-Enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions