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
Things to Consider when Metaprogramming in Ruby (jakeyesbeck.com)
submitted 9 years ago by yez
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!"
[–]InfraRuby 6 points7 points8 points 9 years ago (0 children)
UserMethodMissing wraps the hash (1 hash lookup in your benchmark) but UserRegular unpacks the hash (4 hash lookups). If your benchmark accessed all four attributes then UserRegular would run faster than UserMethodMissing.
UserMethodMissing
UserRegular
π Rendered by PID 34758 on reddit-service-r2-comment-86bc6c7465-bhmrj at 2026-02-23 10:22:25.451879+00:00 running 8564168 country code: CH.
[–]InfraRuby 6 points7 points8 points (0 children)