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

Keyword argument handling on Ruby 2.7 #116

Open
mrkn opened this issue Apr 22, 2020 · 2 comments
Open

Keyword argument handling on Ruby 2.7 #116

mrkn opened this issue Apr 22, 2020 · 2 comments
Assignees

Comments

@mrkn
Copy link
Owner

mrkn commented Apr 22, 2020

We can remove the last empty Hash in the following case in Ruby 2.7 because we can distinguish arguments of Hash and keyword arguments in Ruby 2.7.

>> s4 = Pandas::Series.new({c: 100, b: 200, a: 300}, {})
=>
c    100
b    200
a    300
dtype: int64

>> Pandas::Series.new({c: 100, b: 200, a: 300})
Traceback (most recent call last):
        6: from /Users/mrkn/.rbenv/versions/2.7/bin/irb:23:in `<main>'
        5: from /Users/mrkn/.rbenv/versions/2.7/bin/irb:23:in `load'
        4: from /Users/mrkn/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/irb-1.2.3/exe/irb:11:in `<top (required)>'
        3: from (irb):28
        2: from /Users/mrkn/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pycall-1.3.0/lib/pycall/pytypeobject_wrapper.rb:24:in `new'
        1: from /Users/mrkn/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/pycall-1.3.0/lib/pycall/pytypeobject_wrapper.rb:24:in `call_object'
PyCall::PyError (<class 'TypeError'>: __init__() got an unexpected keyword argument 'c')
@mrkn mrkn self-assigned this Apr 22, 2020
@Mark24Code
Copy link

Same problem +1

@mrkn
Copy link
Owner Author

mrkn commented Aug 25, 2023

We can drop Ruby 2.7 support now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants