Bug #17673
Updated by stiuna (Juan Gregorio) over 4 years ago
The first byte of my file starts with the value **'1A'** .
Then:
``` ruby
descriptor = IO.sysopen(filePath)
file2Read = IO.new(descriptor)
file2Read.sysseek(0)
p file2Read.sysread(2).unpack('H*')
#=> "EOFError (end of file reached)"
```
But when I change the first byte of my file to **'AA'** 'AA' for example.
Then:
``` ruby
#=> "aa45"
```
Is it a bug or am I missing something? I thought sysseek only changed the cursor and nothing else.
This error only occurs with byte **'1A'** I did the test with the rest of the bytes [00..FF] and there is no problem except with "1A".