@@ -38,7 +38,7 @@ The easiest way to run Ruby on browser is to use `browser.script.iife.js` script
38
38
39
39
``` html
40
40
<html >
41
- <
script src =
" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .1 /dist/browser.script.iife.js" ></
script >
41
+ <
script src =
" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .2 /dist/browser.script.iife.js" ></
script >
42
42
<script type =" text/ruby" >
43
43
require " js"
44
44
JS .global [: document ].write " Hello, world!"
@@ -51,8 +51,8 @@ If you want to control Ruby VM from JavaScript, you can use `@ruby/wasm-wasi` pa
51
51
``` html
52
52
<html >
53
53
<script type =" module" >
54
- import { DefaultRubyVM } from " https://cdn.jsdelivr.net/npm/@ruby/[email protected] .1 /dist/browser/+esm" ;
55
- const response = await fetch (" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .1 /dist/ruby+stdlib.wasm" );
54
+ import { DefaultRubyVM } from " https://cdn.jsdelivr.net/npm/@ruby/[email protected] .2 /dist/browser/+esm" ;
55
+ const response = await fetch (" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .2 /dist/ruby+stdlib.wasm" );
56
56
const module = await WebAssembly .compileStreaming (response);
57
57
const { vm } = await DefaultRubyVM (module );
58
58
@@ -69,11 +69,11 @@ If you want to control Ruby VM from JavaScript, you can use `@ruby/wasm-wasi` pa
69
69
70
70
``` html
71
71
<html >
72
- <
script src =
" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .1 /dist/browser.umd.js" ></
script >
72
+ <
script src =
" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .2 /dist/browser.umd.js" ></
script >
73
73
<script >
74
74
const main = async () => {
75
75
const { DefaultRubyVM } = window [" ruby-wasm-wasi" ];
76
- const response = await fetch (" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .1 /dist/ruby+stdlib.wasm" );
76
+ const response = await fetch (" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .2 /dist/ruby+stdlib.wasm" );
77
77
const module = await WebAssembly .compileStreaming (response);
78
78
const { vm } = await DefaultRubyVM (module );
79
79
128
128
129
129
``` html
130
130
<html >
131
- <
script src =
" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .1 /dist/browser.script.iife.js" ></
script >
131
+ <
script src =
" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .2 /dist/browser.script.iife.js" ></
script >
132
132
<script type =" text/ruby" data-eval =" async" >
133
133
require " js"
134
134
@@ -143,8 +143,8 @@ Or using `@ruby/wasm-wasi` package API `RubyVM#evalAsync`:
143
143
``` html
144
144
<html >
145
145
<script type =" module" >
146
- import { DefaultRubyVM } from " https://cdn.jsdelivr.net/npm/@ruby/[email protected] .1 /dist/browser/+esm" ;
147
- const response = await fetch (" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .1 /dist/ruby+stdlib.wasm" );
146
+ import { DefaultRubyVM } from " https://cdn.jsdelivr.net/npm/@ruby/[email protected] .2 /dist/browser/+esm" ;
147
+ const response = await fetch (" https://cdn.jsdelivr.net/npm/@ruby/[email protected] .2 /dist/ruby+stdlib.wasm" );
148
148
const module = await WebAssembly .compileStreaming (response);
149
149
const { vm } = await DefaultRubyVM (module );
150
150
0 commit comments