-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shim IO#pread when not supported #52
Conversation
c037b2b
to
9fbc40e
Compare
Ah, on TruffleRuby as well it's missing. |
cc @SamSaffron, really sorry for not catching this earlier. |
9fbc40e
to
288460f
Compare
Hum, I'm not too sure what is going on on windows :/ |
Ok, so it seems that on Windows the index is offsettted because of [:info, " base64 \r\nmseq application/vnd.mseq "]
[:info, " base64 \r\nmsl application/vnd.Mobius.MSL "]
[:info, " base64 \r\nmts model/vnd.mts "]
[:info, " base64 \r\nmus application/vnd.musician "]
[:info, " base64 \r\nmusicxml application/vnd.recordare.m"] I'll try to figure out a solution, it's just very painful to not be able to figure this out locally :/ |
43f1495
to
67a1b13
Compare
# We must open the file in binary mode | ||
# otherwise Ruby's automatic line terminator | ||
# translation will skew the row size | ||
@file = ::File.open(filename, 'rb') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so it's because for IOs in text mode, Ruby automatically replace \r\n
by \n
, so the row_length
end up being off by one.
Hum, there is one failure left on Windows that I can't make much sense of:
|
Typically on Windows.
67a1b13
to
4c4c49b
Compare
Nevermind, that test compare results with the |
No worries, can you add a special case in the test for windows then? I don't think there is a mega rush here, Ruby on Windows is really really painful |
this is most likely because Ruby doesn't have a stable sort, see:
in this case, if you compare 2 mime types with the same priority, the result will be I would say, it's a bug in mime-types's implementation and it's safe to ignore it... |
sounds good, I guess we just add a special case into the spec? |
68e93ec
to
858f145
Compare
Ok, so here's the list of differences on Windows:
|
858f145
to
d2dc0aa
Compare
58fe4c0
to
a92ac6e
Compare
Ok, I added a list of windows differences. |
looks good to me! Thanks @casperisfine |
Followup: #50
Typically on Windows.