Skip to content

Instantly share code, notes, and snippets.

@marcric
Created February 13, 2010 17:15
Show Gist options
  • Save marcric/303568 to your computer and use it in GitHub Desktop.
Save marcric/303568 to your computer and use it in GitHub Desktop.
s = ['eeny','meeny','miny','moe']
puts '==========='
s.each do |v|
myvar = v
puts myvar
puts myvar.object_id
end
puts '==========='
s.each do |v|
myvar = 'Constant'
puts myvar
puts myvar.object_id
end
puts '==========='
s.each do |v|
myvar = :Symbol
puts myvar.to_s
puts myvar.object_id
end
puts '==========='
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment