### Discussed in https://github.com/ruby/ruby.wasm/discussions/210 <div type='discussions-op-text'> <sup>Originally posted by **sebnozzi** May 12, 2023</sup> 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? ```ruby 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 </div>