[ruby-core:111828] [Ruby master Bug#19342] String#encode does not always throw exceptions for invalid source encodings