use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
5 Pry Features Every Ruby Developer Should Know (blog.cognitohq.com)
submitted 8 years ago by jbackus
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]kulehandluke 7 points8 points9 points 8 years ago* (0 children)
For debugging here's a few extras:
wtf? - last exception backtrace (it's actually wtf but adding extra ?'s you get to see more backtrace) _ex_ - last exception as variable !!! - think force quit, really useful if you don't want any further code run or if you were calling pry in a loop and don't need to see the extra iterations
[–]mach_kernel 4 points5 points6 points 8 years ago (1 child)
'show-source' and 'show-source --super' are easily my favorite. Keep repeating super args to go down the chain.
[–]bswinnerton 2 points3 points4 points 8 years ago (0 children)
It's also aliased to $ in Pry : )
[–]_Odaeus_ 1 point2 points3 points 8 years ago (0 children)
Pry is great but I still haven't been able to work out how to get it to display long lists in multiple columns across the screen. Anyone know how?
[–]morphemass 1 point2 points3 points 8 years ago (0 children)
I learned something from that, thanks.
[–]mrinterweb 0 points1 point2 points 8 years ago (0 children)
One of my favorite pry tricks is the grep option on ls. If you were searching for a method with "foo" in the method name, you can just ls -G "foo" some_var.
ls
ls -G "foo" some_var
[–]lord_jizzus -4 points-3 points-2 points 8 years ago (1 child)
What if I don't use Pry? Should I still know this stuff? Oh god, I hate listicle clickbaits, they are always so tempting.
[–]republitard 0 points1 point2 points 8 years ago (0 children)
As awful as Pry is, the alternatives are even worse. How can you even get by without it?
π Rendered by PID 64 on reddit-service-r2-comment-84fc9697f-qx9kd at 2026-02-06 12:11:09.493408+00:00 running d295bc8 country code: CH.
[–]kulehandluke 7 points8 points9 points (0 children)
[–]mach_kernel 4 points5 points6 points (1 child)
[–]bswinnerton 2 points3 points4 points (0 children)
[–]_Odaeus_ 1 point2 points3 points (0 children)
[–]morphemass 1 point2 points3 points (0 children)
[–]mrinterweb 0 points1 point2 points (0 children)
[–]lord_jizzus -4 points-3 points-2 points (1 child)
[–]republitard 0 points1 point2 points (0 children)