Dissecting Ruby with Ruby
summary
Uses nothing fancy beyond prints and kernel probes to find the exact ruby file and line that a method comes from and where it was called, demonstrating caller.inspect, Method#source_location and Module methods like instance_method. Applied to Rails actionpack url_for/link_to confusion caused by a host set to "http://", traced the stack, added a protocol‑stripping change, tests and changelog, and turns that diagnosis into a pull request that lands in Rails.
AI-written summary · about
chapters (11)
- 0:00Start
- 0:38married to Ruby, so to speak
- 7:36Let's look at Ruby
- 8:04Kernel#caller gives you the back trace
- 11:19link_to in (rails) email templates needs a host set, but fails if you include http
- 14:08Method# source_location to the rescue
- 15:59Too much Ruby?
- 17:17What were we doing?
- 20:30Reproduce the problem
- 21:02Awareness (open an issue)
- 22:42Any other fun features?








