Created
January 21, 2014 05:27
-
-
Save jakenotjacob/8534855 to your computer and use it in GitHub Desktop.
Testing block precedence in TagLib
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
require 'taglib' | |
arr = ["examples/toons/toki/wrongdirname/4. Cigarette Lust.mp3", | |
"examples/toons/toki/wrongdirname/wrongartistlocation/07 - Towers (Ft. Szjerdene).mp3", | |
"examples/toons/04-caspa-i_beat_my_robot-jah.mp3", | |
"TuneSort.rb"] | |
arr.each do |ele| | |
TagLib::FileRef.open ele { |e| | |
puts e | |
} | |
end | |
#=> NoMethodError: undefined method `ele' for main:Object | |
arr.each { |ele| | |
TagLib::FileRef.open ele do |e| | |
puts e | |
end | |
} | |
##<TagLib::FileRef:0x00000002ae9ed8> | |
##<TagLib::FileRef:0x00000002ae9de8> | |
##<TagLib::FileRef:0x00000002ae9cf8> | |
##<TagLib::FileRef:0x00000002ae9c08> | |
#=> ["examples/toons/toki/wrongdirname/4. Cigarette Lust.mp3", | |
# "examples/toons/toki/wrongdirname/wrongartistlocation/07 - Towers (Ft. Szjerdene).mp3", | |
# "examples/toons/04-caspa-i_beat_my_robot-jah.mp3", | |
# "TuneSort.rb"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment