Merge commit 'der-rich/master'

* commit 'der-rich/master':
  removed unnecessary .to_a
  Using String#unpack instead of String#bytes to work with Ruby < 1.8.7

Conflicts:
	lib/compass/grid_builder.rb
This commit is contained in:
Chris Eppstein 2010-01-10 13:47:10 -08:00
commit 6148abf04a

View File

@ -15,7 +15,7 @@ module Compass
class << self
def crc(chunkdata='')
chunkdata.bytes.to_a.inject(0xffffffff){|crc, byte| CRC_TABLE[(crc ^ byte) & 0xff] ^ (crc >> 8) } ^ 0xffffffff
chunkdata.unpack('C*').inject(0xffffffff){|crc, byte| CRC_TABLE[(crc ^ byte) & 0xff] ^ (crc >> 8) } ^ 0xffffffff
end
def chunk(type, data="")