Skip to content

Instantly share code, notes, and snippets.

@domgetter
Created August 14, 2013 03:08
Show Gist options
  • Save domgetter/6227690 to your computer and use it in GitHub Desktop.
Save domgetter/6227690 to your computer and use it in GitHub Desktop.
file = File.new("test.wav", "r")
file.pos
=> 0
file.getc
=> "R"
# So far so good. wav files should begin with "RIFF"
file.pos
=> 6722
# Whaaa...?? Why isn't the position at 1? If I run file.getc again I SHOULD get teh next character "I", no?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment