I’m just starting to get into ruby and have a hard time figuring out what $~ stands for in this line of code (From the Octopress source):
@img = attributes.reduce({}) { |img, attr| img[attr] = $~[attr].strip if $~[attr]; img }
Update: Could it be shorthand for last-accessed object/array ?
The MatchData of the last regex in the current scope.
http://ruby.wikia.com/wiki/Special_variable#List_of_special_variables