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

Use LONG2NUM and NUM2LONG to support all values of the 'long' type #295

Merged
merged 1 commit into from
Apr 10, 2016

Conversation

mkauf
Copy link
Contributor

@mkauf mkauf commented Apr 8, 2016

Some values of the 'long' type cannot be represented as a Fixnum, e.g. the curl constant CURLAUTH_ANY is a Bignum.

In order to support such values, LONG2NUM and NUM2LONG must be used.
INT2FIX, FIX2INT, FIX2LONG and LONG2FIX must not be used (except in some special cases), because the value may get truncated.

The performance impact of this change is very small and negligible.

Setting http_auth_types = :any now really works.

Some values of the 'long' type cannot be represented as a Fixnum, e.g. the curl
constant CURLAUTH_ANY is a Bignum.

In order to support such values, LONG2NUM and NUM2LONG must be used.
INT2FIX, FIX2INT, FIX2LONG and LONG2FIX must not be used (except in some
special cases), because the value may get truncated.

The performance impact of this change is very small and negligible.

Setting 'http_auth_types = :any' now really works.
@taf2 taf2 merged commit 4234d4a into taf2:master Apr 10, 2016
@mkauf mkauf deleted the long_numbers_bugfix branch April 10, 2016 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants