Skip to content

Instantly share code, notes, and snippets.

@kaungst
Last active November 10, 2017 21:44
Show Gist options
  • Save kaungst/5354fddebe4643fbd493902988770fb1 to your computer and use it in GitHub Desktop.
Save kaungst/5354fddebe4643fbd493902988770fb1 to your computer and use it in GitHub Desktop.
Cool irb feature in ruby 2.4+
require 'irb'
class TroublesomeClass
def method_making_a_fuss(bad_argument)
return if bad_argument == false
binding.irb # you enter a repl where you can `puts bad_argument`
end
end
TroublesomeClass.method_making_a_fuss('yolo')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment