Opal rb eval method throws 'undefined method'

165 views Asked by At

Doesn't Opal.rb have an eval method? Using eval both in classes and outside throws undefined method 'eval' Everything else works fine.

1

There are 1 answers

0
Elia Schito On BEST ANSWER

Kernel#eval is defined in opal-parser as it needs to be able to parse Ruby into JS in the browser, so you need to require "opal-parser" first.