On 6/18/22 22:58, Bruce Gray wrote:
If all you want is to append 0xBB to $y, either of these will work: $y ~= Buf.new(0xBB); $y.append(0xBB);
Did not realize I could use buf new like that. Thank you! Append numbers to a buffer: > $x Buf:0x<41 42 43 44> > $x.append( 0xDD ); Buf:0x<41 42 43 44 DD> > $x.append( 0xEE..0xF1 ); Buf:0x<41 42 43 44 DD EE EF F0 F1> > $x.append( 0xA1, 0xA3, 0xA5 ); Buf:0x<41 42 43 44 DD EE EF F0 F1 A1 A3 A5> $x ~= buf8.new( 0xBB, 0xBC ); Buf:0x<41 42 43 44 DD EE EF F0 F1 A1 A3 A5 BB BC>