`code` should be an Array of byte values at this point, so just:
```ruby
code.each do |byte|
  ...
end
```