Skip to content

Instantly share code, notes, and snippets.

@chuyeow
Created September 1, 2009 05:07
Show Gist options
  • Save chuyeow/178913 to your computer and use it in GitHub Desktop.
Save chuyeow/178913 to your computer and use it in GitHub Desktop.
var = :foo
%w(a b c).each do |var|
# Do something.
end
puts var # var is actually "c", not :foo. This is not a problem in Ruby 1.9 onwards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment