If you use binding.pry when debugging like I do, you may find Pry’s show-source method useful. Use it to see the source code of a method (complete with syntax highlighting). show-source has the useful alias $, so you can even write something like $ some_method to quickly see a method’s source code while debugging.

For more on how show-source works, check out the Pry wiki.