1
0
Fork 0
mirror of https://github.com/rails/execjs synced 2023-03-27 23:21:20 -04:00

Restore CI for the V8 runtime

This commit is contained in:
Jean Boussier 2021-05-15 12:37:38 +02:00
parent d19a51d43a
commit 3e94078793
2 changed files with 12 additions and 1 deletions

View file

@ -37,6 +37,10 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install V8
run: |
brew update
brew install v8
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:

View file

@ -1,7 +1,14 @@
(function(program, execJS) { execJS(program) })(function() { #{source} (function(program, execJS) { execJS(program) })(function(console, setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, clearImmediate) { #{source}
}, function(program) { }, function(program) {
var output; var output;
try { try {
delete this.console;
delete this.setTimeout;
delete this.setInterval;
delete this.clearTimeout;
delete this.clearInterval;
delete this.setImmediate;
delete this.clearImmediate;
result = program(); result = program();
if (typeof result == 'undefined' && result !== null) { if (typeof result == 'undefined' && result !== null) {
print('["ok"]'); print('["ok"]');