Skip to content

Instantly share code, notes, and snippets.

@havenwood

havenwood/foo.rb Secret

Created February 26, 2021 00:24
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 havenwood/2ebdc2745bd636f74aa0af1083713b8a to your computer and use it in GitHub Desktop.
Save havenwood/2ebdc2745bd636f74aa0af1083713b8a to your computer and use it in GitHub Desktop.
def foo=(value)
puts "#{__method__} called!!!"
end
##
# Note, nothing is printed, the method above isn't called.
foo = 42
defined? foo
"local-variable"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment