ruby_debugging

Familiarize yourself with common Ruby idioms and debugging tools

29
8
Ruby

Ruby Debugging

Welcome to the Ruby Debugging repository. The goal of this repository is to get
you familiar with common debugging tools and idioms. At the end of it I hope you
will have a better understanding of Ruby itself.

Each exercise will present new idioms or reinforce existing ones.

Topics covered:

  • ruby/debug
  • ancestors
  • singleton_class.ancestors
  • methods
  • methods.grep
  • instance_variables
  • instance_methods
  • public_methods
  • private_methods
  • method(:method_name).source_location
  • method(:method_name).super_method.source_location
  • backtrace
  • caller
  • TracePoint

Requirements

  • Ruby version 3.1.0 or higher
  • bundle install --path vendor/bundle

Instructions

  1. Clone this repository
  2. Work your way through each level, for example:
    • cd 01/
    • bundle exec ruby main.rb

Warning
Do not forget to bundle install --path vendor/bundle and to run the examples with bundle exec

Every problem has an associated README.md file with instructions and hints. Pay special attention to the “New concepts” section and try to replicate thre commands since it will introduce new concepts that you might not be familiar with and will help you through your debugging journey.

Warning
Do not forget to cd into each challenge folder.

Expected Output

Every solved exercise should include the following output.

Framework: Ruby
Version: 3.2.2
Workshop: Ruby debugging

Reading Material

Contributing

  • Open an Issue or Pull Request
  • Reach out @bernardo_amc on Twitter