metacall / core

MetaCall: The ultimate polyglot programming experience.
https://metacall.io
Apache License 2.0
1.55k stars 160 forks source link

NodeJS Loader could not convert the value of type 'Invalid' to N-API #516

Open Mostafa-wael opened 1 month ago

Mostafa-wael commented 1 month ago

🐛 Bug Report

I got an error while using the string manipulation example.

Expected Behavior

It should output: NodeJS Loader could not convert the value of type 'Invalid' to N-API

Current Behavior

I got: [null,0]

Steps to Reproduce

  1. metacall load rb examples/string-manipulation/str.rb
  2. call longest_repetition("")

Context (Environment)

Windows10

viferga commented 1 month ago

@Mostafa-wael can you link or paste this code? examples/string-manipulation/str.rb

Mostafa-wael commented 1 month ago

You can find the code here.