From: KOSAKI Motohiro Date: 2012-04-28T21:52:45+09:00 Subject: [ruby-core:44731] Re: [ruby-trunk - Feature #6361] Bitwise string operations On Fri, Apr 27, 2012 at 8:53 PM, MartinBosslet (Martin Bosslet) wrote: > > Issue #6361 has been updated by MartinBosslet (Martin Bosslet). > > > nobu (Nobuyoshi Nakada) wrote: >> Then what kind of methods should Blob have? >> >> And does it need to be built-in? > > A real advantage of having it built-in could be > that this gives us the chance to fix #5741 at > the same time. I could imagine that we have two > kinds of "byte array" classes - one, mutable, > that shares COW semantics and all the other > optimizations with String, but with no notion of > encoding and a yet-to-be-defined interface. > > And then a second class, which is basically the > immutable version of the first one. By sharing > only a reference we could ensure that the content > would not be proliferated and we could securely > erase its contents after use. I don't dislike a bult-in idea. But you haven't show a detailed spec and I don't think I clearly understand your idea. Can you spend a few time for writing a spec? (probably rough a few line explanation is enough)