It seems to me that sometimes abstracting Fiber.yield can actually does more harm than good. For example, let's say fiber_yield_def does Fiber.yield and only the below methods use it:
Spoiler
def fiber_yield_def Fiber.yieldenddef method_a1 some_code_a1 fiber_yield_def some_other_code_a1enddef method_a2 some_code_a2 fiber_yield_def some_other_code_a2enddef method_a3 some_code_a3 fiber_yield_def some_other_code_a3end# ...def method_an some_code_an fiber_yield_def some_other_code_anend
If another scripter wants to add the same thing right before or after Fiber.yield to all those methods, abstracting it to fiber_yield_def will of course help solving compatibility issues. But what if that scripter only wants some of those methods to add those stuffs, or what if that scripter wants to add different things on different methods? Then that scripter would still probably have to rewrite all those methods involved, as simply editing fiber_yield_def would also alter the behavior of all the other methods that scripter didn't want to change.
Although the compatibility issues wouldn't be any harder to solve, the performance cost would increase for almost nothing. If fiber_yield_def were called really frequently(like called every frame), the performance impact could even become significant(bear in mind there are some other things that are run every frame, and the increased performance impact here might just be enough to begin to cause a noticeable constant fps drop on not so powerful machines).
To me, it's likely a case-by-case problem. In some cases it's reasonable to think that most of the others are extremely likely to change all methods using Fiber.yield in the same way, but in some cases the opposite maybe true. I'd prefer a case-by-case analysis to help me decide whether abstraction will likely be better for compatibility, and whether that benefit will outclass the performance impact.
Also, I think sometimes the compatibility vs code performance issues are dependent on the actual cases as well.
In some cases, code performance's just critical with next to no exception. Codes that are run every frame can be in these cases. An example is methods called every frame in a complicated atb system, as lots of stuffs are often updated per frame(and some of them demand quite some resources, like redrawing all battlers' atb bars when their atb values change, and they can be changed every frame). Here I'd probably lean my code to the performance side even if the compatibility has to be somehow sacrificed, as codes with poor performance here would probably cause significant constant fps drop unless the machine's powerful. I've been editing an atb system(although my edit isn't released) and in my machine, simply getting rid of most 1-2 line methods boosted the average fps by nearly 10 already, which is significant imo.
In some other cases, code performance's not such a great deal, at least not big enough to compromise even just a bit of compatibility. Most things that won't run frequently and have to run codes demanding lots of resources can be these cases. An example is refreshing the status window in Yanfly's Ace Battle Engine. Here it's the drawing itself that's really expensive(probably because it draws actor faces and action icons as well), almost everything else combined is trivial in terms of performance impact. Even that of the dreaded eval(as long as the codes evaluated are simple) is an utter joke compared to that of the drawing. In my test case, The cost of 1 such drawing alone already rivals 10000 simple eval. Not to mention that the cost of eval is much, much higher than that of method calls(can be up to about 86 times higher in my previous benchmarks). Note that all these are machine dependent though.
Maybe there are some cases where compatibility is critical, but as I haven't encountered any such cases, I can't talk about them. Maybe the core engines can be these cases but I'm not sure on this one(Like the notorious incompatibility between Yanfly's Battle Engine and Victor's Basic Module that breaks compatibility between many of their scripts. Some users still hope they can be solved although many of them are extremely unlikely to be solved).
About 1 line methods, I'll try to avoid that in general(although I'll still use them in some cases), but I'll also try to avoid the other extreme(or at least I think so) as much as possible, like some 40+ line methods(I've dealt with several of those before and it's really painful for me to rewrite the entire methods when I just have to change several lines).
In my experience(although I just have 1 year of it), most 4-5 line methods are short enough to have a reasonable compatibility in general and many 10 line methods can sometimes still be acceptable, while most 20+ lines(let alone 40+ lines) method will probably start to harm compatibility. Of course I'd also prefer a case-by-case approach here.