class ExecJS::ExternalRuntime::Context
def exec(source, options = {})
def exec(source, options = {}) source = source.encode(Encoding::UTF_8) source = "#{@source}\n#{source}" if @source != "" source = @runtime.compile_source(source) tmpfile = write_to_tempfile(source) if ExecJS.cygwin? filepath = `cygpath -m #{tmpfile.path}`.rstrip else filepath = tmpfile.path end begin extract_result(@runtime.exec_runtime(filepath), filepath) ensure File.unlink(tmpfile) end end