Created
August 14, 2013 03:19
-
-
Save domgetter/6227735 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> ruby pos_test.rb | |
First position: 0 | |
Got byte: 82 | |
Final position: 6722 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file = File.new("test.wav", "r") | |
puts "First position: #{file.pos}" | |
char = file.getbyte | |
puts "Got byte: #{char}" | |
file.pos | |
puts "Final position: #{file.pos}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment