We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
to_js
Originally posted by sebnozzi May 12, 2023 According to the documentation I should be able to call to_js in a Float value, right?
https://ruby.github.io/ruby.wasm/Float.html
Then why does this throw an error?
require "js" (Math::PI).to_js
Output:
(file): eval:3:in `<main>': undefined method `to_js' for 3.141592653589793:Float (NoMethodError) (Exception)
Link: https://try.ruby-lang.org/playground/#code=require+%22js%22%0A%0A(Math%3A%3API).to_js&engine=cruby-3.2.0
The text was updated successfully, but these errors were encountered:
The TryRuby is a little bit old. Please try with the latest version
Sorry, something went wrong.
No branches or pull requests
Discussed in #210
Originally posted by sebnozzi May 12, 2023
According to the documentation I should be able to call
to_js
in a Float value, right?https://ruby.github.io/ruby.wasm/Float.html
Then why does this throw an error?
Output:
Link:
https://try.ruby-lang.org/playground/#code=require+%22js%22%0A%0A(Math%3A%3API).to_js&engine=cruby-3.2.0
The text was updated successfully, but these errors were encountered: