Skip to content

Instantly share code, notes, and snippets.

@cdcooksey
Last active February 4, 2023 08:14
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 cdcooksey/dd99b603bd3a960060d949002a2a9c45 to your computer and use it in GitHub Desktop.
Save cdcooksey/dd99b603bd3a960060d949002a2a9c45 to your computer and use it in GitHub Desktop.
irb
irb(main):001:> why_are_we_here = -> (x) { puts x }
irb(main):002:> why_are_we_here.call("It's worth it.")
It\'s worth it.
=> nil
irb(main):003:> why_are_we_here = -> (x) { why_are_we_here(x) }
irb(main):004:> why_are_we_here.call(nil)
Traceback (most recent call last):
5: from /usr/bin/irb:23:in `<main>'
4: from /usr/bin/irb:23:in `load'
3: from /usr/lib/ruby/gems/2.7.0/gems/irb-1.2.1/exe/irb:11:in `<top (required)>'
2: from (irb):8
1: from (irb):7:in `block in irb_binding'
IRB::NoSuchJob (No such job().)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment