Skip to content

Marshalling nested rb Date to js Date is not working. #136

@awinograd

Description

@awinograd
ctx = MiniRacer::Context.new
ctx.eval("var foo = function (obj) { console.log(obj); }")
ctx.call("foo", { my_date: Date.today }) # JS logs => "{ my_date: "Undefined Conversion" }"

DateTime and Time both work fine. Looks like Date falls into the default case here: https://github.com/discourse/mini_racer/blob/b3c9b35859deb189586384f3ae927586a36dda14/ext/mini_racer_extension/mini_racer_extension.cc#L528

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions