Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip spaces early so we don't consume more tokens
Several new unpack specs were failing because they did not raise an error for directives like "a 0A". The problem was that because the handling of the space occurred in the main switch for unpack, it also caused the "0" to be consumed as an unused occurrence count. The unpack then proceeded on to the "A" and returned a result rather than raising. This change matches CRuby by moving the space check all the way to the top of the loop, so that spaces are skipped without any further processing of the next element in the directive.
- Loading branch information