https://rconv.ongaeshi.me Ruby on Browser に続いて Ruby WASM/WASI で電卓っぽいものを作りました。 ongaeshi.hatenablog.com テキストボックスの内容を入力としてRubyスクリプトに渡して評価し実行結果を出力します。つまり入力→変換→出力するRubyアプリケーションがブラウザ上で簡単に作れます。コードはURLに記録されるので簡単に共有することができます。 基本 Rconv.set()メソッドに渡したブロックの中身が変換プログラムになります。ブロック引数に渡されるのはテキストボックスの内容がevalされたものです。Always string = true のときは常に文字列になります。ブロックの戻り値、もしくは標準出力に何か出力されたときはその内容が、そうでないときはブロックの戻り値が出力されます。 例えば irb