Closed koic closed 7 years ago
Thank you!
I don't accept this PR as it is.
I want to accept changes in comments and reject changes in lib/oci8/comapt.rb
and test/*
.
If changes in test/*
are merged, Fixnum and Bignum tests are dropped for rubies before 2.4.
I'll make minimum changes in files under not to warn constant ::Fixnum is deprecated
and
release a new ruby-oci8 version to include your previous PR.
After that, I'll check other changes in this PR.
I got it. Thanks for making minimum changes. I'm looking forward to the release. Thanks.
ruby-oci8 2.2.3 was released. Thank you!
@kubo Thank you for release! May I resolve this PR conflict?
@kubo, @koic - in cursor.rb#L61-L62 we have a comment about bind_param
:
To bind as number, Fixnum and Float are available, but Bignum is not supported.
Is that still true in some sense? Is there any limitation for the range of bind_param(:in, value)
when the value is Integer
, Fixnum
, Bignum
?
I'm doing some tests now with bind_param(:in, value)
and I have a feeling that it's working fine with pretty big integers (beyond the range of Fixnum
). Bit it could be something specific to my setup (ruby 2.4.0, Oracle 11.2).
@koic I'd appreciate it if you resolve the conflict. Could you revert the followings?
test/*
for Fixnum and Bignum tests before ruby 2.4spec/*
because these files have not been used. I'll delete them.lib/oci8/compat.rb
excluding this line@javornikolov Thank you! No, that isn't true for long time. I wrote it 11 years ago and have not checked it again...
@koic, I merged it. Thank you!
@kubo Thanks for your support. Many Thanks 🙏
Summary
Ruby 2.4.0 unifies Fixnum and Bignum into Integer.
https://bugs.ruby-lang.org/issues/12005
Fix following deprecated warnings in Ruby 2.4.0+.
warning: constant ::Fixnum is deprecated
warning: constant ::Bignum is deprecated
There are notes below. The following codes are for compatibility with 2.3 or lower.
0.class
(2**64).class
I wrote assuming that
(2**64)
is big enough becomeBignum
.And, it is unified with
Integer
for codes without problem.oracle-enhanced
This PR is also confirmed by the following combinations.
Thanks.