Skip to content

Instantly share code, notes, and snippets.

@worker8
Created October 16, 2012 07:02
Show Gist options
  • Select an option

  • Save worker8/3897650 to your computer and use it in GitHub Desktop.

Select an option

Save worker8/3897650 to your computer and use it in GitHub Desktop.
what-class
def what_class(&code)
return code.class
end
def func
"nothing"
end
puts (what_class do end)
puts Proc.new {}.class
puts lambda{}.class
puts method(:func).class
#=== Result ===
Proc
Proc
Proc
Method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment