How exactly did you test this? Did you also create strings in those different encodings? The reason it works in the spec is because the original encoding is utf-8 and it forces back to it. But to properly test with at least another encoding you also need to create the string originally in that encoding.

One other thing I end up doing if I don't know what the behavior is, is to dive into MRI to read the source code there to understand how it works and what it does.