执行 Ruby 语言代码

admin2021-10-26  205

import win.ui;
/*DSG{{*/
var winform = win.form(text="执行Ruby代码")
winform.add(
edit={cls="edit";left=26;top=16;right=737;bottom=435;multiline=1;z=1}
)
/*}}*/

import process.ruby;
var out = process.ruby.exec("puts '测试UTF-8'")
winform.edit.print(out);

var out = process.ruby.eval(`[1, 2, { name: "tanaka", age: 19 }]`)
winform.edit.print(out);

winform.show();
win.loopMessage();
转载请注明原文地址: http://www.aardio.net/read-246.html
最新回复(0)
aardio问答
aardio编程语言