Skip to content

Instantly share code, notes, and snippets.

@Sheile
Created February 24, 2014 08:01
Show Gist options
  • Save Sheile/9183638 to your computer and use it in GitHub Desktop.
Save Sheile/9183638 to your computer and use it in GitHub Desktop.
Difference of variable and function
def hoge arg
puts "hoge--- #{arg}"
end
[1, 2].each do |hoge|
hoge hoge
end
=begin
hoge---1
hoge---2
=> [1, 2]
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment