Skip to content

Instantly share code, notes, and snippets.

@aostrega
Last active August 29, 2015 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aostrega/6aad61bdf2fcb79a7b0a to your computer and use it in GitHub Desktop.
Save aostrega/6aad61bdf2fcb79a7b0a to your computer and use it in GitHub Desktop.
Requiring MRI stdlib in Opal
Run `rackup` then visit http://localhost:9292/stuff.js.
require 'opal'
assets = Opal::Environment.new
assets.append_path('.')
$LOAD_PATH.each { |p| assets.append_path(p) }
run assets
require 'matrix' # Needs Opal >v0.6.2 to parse.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment