Just a style nit, but I wonder if this could avoid adding to the giant indent and be a bit more readable as a one-liner:

```ruby
pos +=1 if marc8_string[pos+2] == ',' and next_byte == '$'
```

(Also, `and` is dangerous, etc. ;) )