News for hackers. Stuff that matters.
Re:Responsible Monkeypatching in Ruby by byroot on Friday August 27, 2021 @07:52AM (#28326635)
The source is me: https://gist.github.com/casperisfine/1c46f05cccfa945cd156f44...

Note that this overhead apply as soon as a refinement is defined for a method regardless of wether it's ever active.

That 40% figure is for an empty method. So for "big" methods that are infrequently called it's probably fine, but it should really be avoided in hotspots.

Re:Responsible Monkeypatching in Ruby by Lio on Friday August 27, 2021 @08:27AM (#28326924)
Aha! Excellent, thank you.

For me refinements are a bit like meta-programming; I'm glad they exist but I think there's other ways to get the same result which are easier to live with.