When attempting to use the PgHero.slow_queries method in an environment with Ruby 3.0.6, an ArgumentError occurs.
Steps to Reproduce:
Upgrade to Ruby 3.0.6
Run PgHero.slow_queries.
Observe the mentioned ArgumentError.
Environment Information:
Ruby version: 3.0.6
PgHero version: 3.4.1
Error Message and Stack Trace:
ArgumentError: wrong number of arguments (given 1, expected 0)
/gems/pghero-3.4.0/lib/pghero/methods/query_stats.rb:4 in query_stats
/gems/pghero-3.4.0/lib/pghero/methods/query_stats.rb:171 in slow_queries
vendor/ruby-3.0.6/lib/ruby/3.0.0/forwardable.rb:238 in slow_queries
236: end;
237: end
238:end
239:
240:# SingleForwardable can be used to setup delegation at the object level as well.
lib/tasks/pg_hero.rake:22 in diagnose_queries
20: def diagnose_queries
21: # Check for slow queries
22: slow_queries_to_notify = PgHero.slow_queries
When attempting to use the
PgHero.slow_queries
method in an environment with Ruby 3.0.6, an ArgumentError occurs.Steps to Reproduce:
PgHero.slow_queries
.Environment Information:
Error Message and Stack Trace: