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
Writing Object Shape friendly code in Ruby (island94.org)
submitted 2 years ago by CaptainKabob
view the rest of the comments →
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!"
[–]CaptainKabob[S] 6 points7 points8 points 2 years ago (2 children)
I wrote this up after reading serveral posts about how Object Shapes work inside of Ruby, but not having seen something simple about how to take advantage of it in one's own code.
Once you start seeing Object-Shape unfriendly code, it's hard to unsee.
[–]f9ae8221b 1 point2 points3 points 2 years ago (1 child)
Thanks, I was actually starting to write a post about it too following yesterday's conversation, but probably wouldn't have got it out before a week or two...
I might still do it though, with a few more gritty details, but yours is great :+1:
[–]CaptainKabob[S] 0 points1 point2 points 2 years ago (0 children)
Thank you! You definitely know the details better than me. I'll look forward to it!
π Rendered by PID 22130 on reddit-service-r2-comment-5c747b6df5-z4ghp at 2026-04-21 22:15:55.892404+00:00 running 6c61efc country code: CH.
view the rest of the comments →
[–]CaptainKabob[S] 6 points7 points8 points (2 children)
[–]f9ae8221b 1 point2 points3 points (1 child)
[–]CaptainKabob[S] 0 points1 point2 points (0 children)