You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The debug gem undefines and redefines singleton_method_added.
The blankslate gem provides a "abstract base class with no predefined methods" except for some core Ruby builtins. "BlankSlate is useful as a base class when writing classes that depend upon method_missing (e.g. dynamic proxies)", so it only works if singleton_method_added is available. However, it hidessingleton_method_added because it's redefined by the debug gem.
This problem does not occur when the debug gem is not required.
This problem breaks one of Stripe's services in development because we start a debug session when it starts up, before it requires the blankslate gem. We are working around the issue, but it would be great if it could be fixed!
Thank you for the report.
I didn't know the blankslate but could you make a smaller repro-code without the blankslate gem?
Otherwise I'll try to make it.
Activity
[-]Loading `debug` gem breaks `BlankSlate`[/-][+]Loading `debug` gem breaks `blankslate` gem[/+]jvilk-stripe commentedon Sep 21, 2022
This problem breaks one of Stripe's services in development because we start a debug session when it starts up, before it requires the blankslate gem. We are working around the issue, but it would be great if it could be fixed!
ko1 commentedon Oct 4, 2022
Thank you for the report.
I didn't know the
blankslatebut could you make a smaller repro-code without theblankslategem?Otherwise I'll try to make it.
dentarg commentedon Apr 4, 2023
minitest also breaks, see minitest/minitest#929
zenspider commentedon Nov 10, 2023
Here is blankslate torn all the way down to a minimal repro:
run w/o
ruby -rdebugto output GOOD and run withruby -rdebugto output BAD...It essentially boils down to "is singleton_method_added defined?"
for minitest/mock, not too dissimilar:
zenspider commentedon Nov 10, 2023
I think in my case I'm going to add
singleton_method_addedtooverridden_methodsifDEBUGGER__is defined.