ToString fail when override it in prototype and object is created with GlobalObject.CreateDateObject

Error:
TypeError: Date.valueOf is not generic

Code :

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CARemObjects
{
public class RemObjectsConsole
{
public RemObjectsConsole()
{ }

    public void write(object v)
    {
        Console.WriteLine(v.ToString());
    }
}

class Program
{
    static void Main(string[] args)
    {
        using (var cmp = new RemObjects.Script.EcmaScriptComponent())
        {

            object o = null;

            cmp.Include("aaa", @"Date.prototype.toString = function () {
return 'full year -> ' + this.getFullYear();

}");
cmp.Include(“test1”, @"
function GlobalFunction(cc, tt) {
cc.write(tt);

return null;

}
");

            RemObjectsConsole d = new RemObjectsConsole();
            o = cmp.RunFunction("GlobalFunction", d, cmp.GlobalObject.CreateDateObject(new DateTime(1977, 3, 4)));
            Console.WriteLine(o);
        }
    }
}

}

Hello.

Thank you for the report.
This bug as reproduced and fixed.
The fix is available at https://github.com/remobjects/script

Thanks