JRuby

RubyString#toString() returns trimmed java.lang.String sequence when the given sequence is malformed