Strings in JavaScript are immutable, replace sub! with sub + reassignment
Explicit require kernel when running Opal