stdlib/opal-parser.rb in opal-0.10.0.beta2 vs stdlib/opal-parser.rb in opal-0.10.0.beta3
- old
+ new
@@ -3,10 +3,12 @@
require 'opal/version'
module Kernel
def eval(str)
str = Opal.coerce_to!(str, String, :to_str)
- code = Opal.compile str, file: '(eval)', eval: true
+ default_eval_options = { file: '(eval)', eval: true }
+ compiling_options = __OPAL_COMPILER_CONFIG__.merge(default_eval_options)
+ code = Opal.compile str, compiling_options
%x{
return (function(self) {
return eval(#{code});
})(self)
}