Skip to content

Commit

Permalink
fixup! Add Kernel#require_remote along with opal-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Mar 24, 2014
1 parent 0c8b4db commit 2714aaf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions stdlib/opal-parser.rb
Expand Up @@ -10,13 +10,12 @@ def eval(str)
end

def require_remote url
source = %x{
%x{
var r = new XMLHttpRequest();
r.open("GET", url, false);
r.send('');
return r.responseText;
}
eval source
eval `r.responseText`
end
end

Expand Down

0 comments on commit 2714aaf

Please sign in to comment.