ruby.js: added g option to regexp