Dataset initialisation broken in ruby 3.0.0
Running any examples from the basic usage notebook locally result in the following error:
ArgumentError: wrong number of arguments (given 2, expected 1) from /.gem/ruby/3.0.0/gems/gnuplotrb-0.4.0/lib/gnuplotrb/staff/dataset.rb:65:in 'initialize'
The only example that works locally for me is:
Plot.new('sin(x)').to_png('plot.png')
Examples here and here all return the same error as well.
ruby version: ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
hi @JC-Morph , hm, indeed, with ruby 3.0+ we now have a problem because keyword args passed to Plot.new are gathered into a Hash and then passed to Dataset.new as Hash while it expects keyword args. It did work in earlier ruby versions but definitely not now. More info on this ruby 3.0 change here. I'll try to take a look at this issue on the weekend, fix should be pretty straightforward but I also need to update CI checks which may a bit more fuzzy :D. As a quick workaround I can only suggest using ruby 2.7