chuyeow (owner)

Revisions

gist: 178913 Download_button fork
public
Public Clone URL: git://gist.github.com/178913.git
Embed All Files: show embed
Block argument scope gotcha on Ruby 1.8.x.rb #
1
2
3
4
5
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.