InfluxCommunity / influxdb-ruby

Ruby client for InfluxDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Ruby 3.0

johannesluedke opened this issue · comments

Ruby 3.0.0 was released https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/, but the latest influxdb release 0.8.0 does not work with it.

Calling query("SELECT * FROM \"#{from}\" GROUP BY \"#{column}\""), I get an ArgumentError: wrong number of arguments (given 2, expected 1)

/.../ruby/3.0.0/gems/influxdb-0.8.0/lib/influxdb/query/core.rb:88:in `query_params'
/.../ruby/3.0.0/gems/influxdb-0.8.0/lib/influxdb/query/core.rb:29:in `query'

It looks like next to b708621,

  • lib/influxdb/client.rb:52 (initialize)
  • lib/influxdb/query/core.rb:88 (query_params)

need a fix to enable ruby 3.0 compatibility after trying it in #246