From: Todd Benson Date: 2008-06-15T17:45:34+09:00 Subject: Re: Binary string packing/unpacking issues On Sun, Jun 15, 2008 at 12:16 AM, Lucas L. wrote: > How can I replace portions of a packed binary string this way? > I know with a normal string it is easy: > irb(main):001:0> s = "abcdef" > => "abcdef" > irb(main):002:0> s[0..2] = "cba" > => "cba" > irb(main):003:0> s > => "cbadef" > > But I can't figure out how to do it with binary. Look closely at Robert's irb line number 9. A string is just bytes in a row with special characteristics/methods. Todd