From: Joel VanderWerf Date: 2008-12-21T05:01:26+09:00 Subject: [ruby-core:20730] Re: Working with binary strings in Ruby 1.9? James Gray wrote: >> * data[10..20] to extract some bytes efficiently > > data.bytes.to_a[10..20] > >> * and use index and rindex to find bytes. > > data.bytes.to_a.index/rindex Is there a way to avoid #to_a? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407