@@ -38,7 +38,7 @@ The easiest way to run Ruby on browser is to use `browser.script.iife.js` script
3838
3939``` html
4040<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 >
4242 <script type =" text/ruby" >
4343 require " js"
4444 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
5151``` html
5252<html >
5353 <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" ); 5656 const module = await WebAssembly .compileStreaming (response);
5757 const { vm } = await DefaultRubyVM (module );
5858
@@ -69,11 +69,11 @@ If you want to control Ruby VM from JavaScript, you can use `@ruby/wasm-wasi` pa
6969
7070``` html
7171<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 >
7373 <script >
7474 const main = async () => {
7575 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" ); 7777 const module = await WebAssembly .compileStreaming (response);
7878 const { vm } = await DefaultRubyVM (module );
7979
128128
129129``` html
130130<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 >
132132 <script type =" text/ruby" data-eval =" async" >
133133 require " js"
134134
@@ -143,8 +143,8 @@ Or using `@ruby/wasm-wasi` package API `RubyVM#evalAsync`:
143143``` html
144144<html >
145145 <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" ); 148148 const module = await WebAssembly .compileStreaming (response);
149149 const { vm } = await DefaultRubyVM (module );
150150
0 commit comments