Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataset initialisation broken in ruby 3.0.0 #22

Open
JC-Morph opened this issue Jul 13, 2023 · 1 comment
Open

Dataset initialisation broken in ruby 3.0.0 #22

JC-Morph opened this issue Jul 13, 2023 · 1 comment
Labels

Comments

@JC-Morph
Copy link

JC-Morph commented Jul 13, 2023

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]

@ievgrafov
Copy link
Member

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

@ievgrafov ievgrafov added the bug label Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants