Closed daveinman closed 3 years ago
I guess that's why I'm getting /lib/metric_fu/loader.rb:37: Invalid yield (SyntaxError)
@meliborn @daveinman Thanks for reporting this issue and suggesting a solution!
I decided to fix it like this: https://github.com/metricfu/metric_fu/pull/321
What do you think?
Running metric_fu version 4.13.0 from ruby version >= 2.7 we get:
The following patch will fix these warnings in loader.rb:
These two warnings are telling us that two methods are yielding after changing into the scope of another class:
My fix does does the yield without moving the body of the method into the scope of 'klass'.