Doesn't Opal.rb have an eval method? Using eval both in classes and outside throws undefined method 'eval' Everything else works fine.
undefined method 'eval'
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.
Kernel#eval
require "opal-parser"
Kernel#eval
is defined in opal-parser as it needs to be able to parse Ruby into JS in the browser, so you need torequire "opal-parser"
first.