You are definitely correct, this is definitely a bug.<p>Helix is setup to do the right thing – it already goes through a coercion protocol, we can easily add the encoding check there. We just missed that detail when porting the code, will fix it soon.<p>I suppose that echoes my point about how system programming in is hard to get right, there are just too many details you have to remember!<p>This is why having a shared solution like Helix is beneficial. By moving all the unsafe code into a common library, it&#x27;s more likely that someone will notice the problem and fix it for everyone.<p>This actually touches on an interesting point I would like to elaborate on. When we say {Helix&#x2F;Rust&#x2F;Ruby} is safe, there is an important caveat – {Helix&#x2F;Rust&#x2F;Ruby} themselves could of course have bugs. I have definitely experienced segfaults on Ruby myself.<p>While true, this caveat is not particularly interesting. It is not a slight of hand. Moving code around doesn&#x27;t magically remove human errors, that&#x27;s not the point. It&#x27;s about establishing clear boundaries for responsibility. (This is why unsafe blocks in Rust is great.)<p>When you get a segfault on Ruby, you know for certain that your code is not the problem. Sure, you might be something weird, but it is part of the contract that the VM is not supposed to crash no matter what you do. As a result, memory safety is just not a thing you have to constantly worry about when programming in Ruby.<p>It is the same thing as saying JavaScript code on a website &quot;cannot&quot; crash the browser, segfaults in user-space code &quot;cannot&quot; cause a kernel panic or malicious code &quot;cannot&quot; fry your chip. All of these could of course (and do) happen – but from the programmer&#x27;s perspective, you can work with the assumption that they are not going to happen (and when they do, it&#x27;s someone else&#x27;s fault). It&#x27;s not &quot;cannot&quot; in the &quot;mathematically proven&quot; sense, but it&#x27;s just a useful abstraction boundary.