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

Replace all references to Fixnum and Bignum with Integer (Fixnum and Bignum are deprecated) #604

Conversation

takkanm
Copy link

@takkanm takkanm commented Dec 20, 2017

Ruby2.4 unify Fixnum and Bignum into Integer

https://bugs.ruby-lang.org/issues/12005

ref translunar#22

@translunar translunar changed the title remove warning Fixnum is deprecated Replace all references to Fixnum and Bignum with Integer (Fixnum and Bignum are deprecated) Dec 20, 2017
@@ -46,7 +46,7 @@ def to_nm(shape = nil, dtype = nil, stype = :dense)

guess_dtype = ->(type) {
case type
when Fixnum then :int64
when Integer then :int64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may present a problem further down the road. Bignum can store more than int64, and this method should probably check for overflow and be able to choose :object instead of :int64. I think the solution is probably to make :object the default dtype for Integer.

With that said, I'm not sure this is your job. It's a spec change. It needs additional consideration. I just wanted to mention it here.

@translunar
Copy link
Member

There are some Travis-CI failures, but I believe they're entirely due to an rdoc incompatibility on Travis. I'm going to go ahead and merge this.

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

Successfully merging this pull request may close these issues.

2 participants