Skip to content

Instantly share code, notes, and snippets.

@emmx

emmx/test.rb Secret

Created July 29, 2016 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emmx/2cf88b033902b59f5c2514e0f0a68070 to your computer and use it in GitHub Desktop.
Save emmx/2cf88b033902b59f5c2514e0f0a68070 to your computer and use it in GitHub Desktop.
def example(a, b)
puts a*b
end
class MyClass
def initialize
myfunc = :example
if respond_to? myfunc
puts send myfunc, 2, 3
end
end
end
# Should print 6
MyClass.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment