Vivarium · Layer 1 · Ruby.wasm
Reproducing ruby/ruby#21709
Ruby's Regexp interpolation rejects fragments of differing
encodings, while String interpolation silently upgrades them
to UTF-8. With prefix = '\p{In_Arabic}' and
suffix = prefix.encode('US-ASCII'),
/#{prefix}#{suffix}/ raises a
RegexpError while "#{prefix}#{suffix}"
builds a UTF-8 string fine. The two interpolation forms
should agree on how to combine fragments of different
encodings — they don't.
Verdict
Loading Ruby.wasm runtime…
Reproduction script
Output
(running)