Skip to content

Commit

Permalink
[Truffle] Modify Rbzlib.crc32 method to get specs passing
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Fish committed Oct 25, 2016
1 parent b515dec commit 9685ac6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
15 changes: 8 additions & 7 deletions lib/ruby/truffle/pr-zlib/lib/pr/rbzlib.rb
Expand Up @@ -415,13 +415,14 @@ def crc32(crc, buf, len=0)
crc = crc ^ 0xffffffff
i = 0

while len >= 8
while i < 8
crc = @@crc_table[(crc ^ buf[i].ord) & 0xff] ^ (crc >> 8)
i += 1
end
len -= 8
end
# Commented out library code here because method specs were failing
# while len >= 8
# while i < 8
# crc = @@crc_table[(crc ^ buf[i].ord) & 0xff] ^ (crc >> 8)
# i += 1
# end
# len -= 8
# end

if len != 0
loop do
Expand Down
3 changes: 0 additions & 3 deletions spec/truffle/tags/library/zlib/crc32_tags.txt

This file was deleted.

0 comments on commit 9685ac6

Please sign in to comment.