Skip to content

Instantly share code, notes, and snippets.

@revans
Last active November 18, 2022 14:41
Show Gist options
  • Save revans/90d6dd689e1e6c5aa74c966fe6389bc9 to your computer and use it in GitHub Desktop.
Save revans/90d6dd689e1e6c5aa74c966fe6389bc9 to your computer and use it in GitHub Desktop.
# Instance Variable that is undefined
@person&.name # => nil
# Method that returns nil
def person; nil; end
person&.name # => nil
# local variable that is undefined - this is the one I am curious about since it "seems" to break convention
adult&.name # => undefined local variable exception raised
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment