[#92891] Question: ruby 2.7.0-preview1 also upgrades bundler to 2.1.0.pre.1? — Al Snow <jasnow@...>
Tried the new 2.7.0-preview1 upgrade to Ruby and see that bundler is also u=
5 messages
2019/05/30
[#92892] Re: Question: ruby 2.7.0-preview1 also upgrades bundler to 2.1.0.pre.1?
— SHIBATA Hiroshi <hsbt@...>
2019/05/30
Bundler 2.1.0.pree.1 is the expected version.
[#92893] Re: Question: ruby 2.7.0-preview1 also upgrades bundler to 2.1.0.pre.1?
— Al Snow <jasnow@...>
2019/05/30
[ruby-core:92616] [Ruby trunk Bug#9089] rb_fix2uint no longer raises a RangeError when given negative values
From:
irxnjhtchlnrw@...
Date:
2019-05-09 14:40:26 UTC
List:
ruby-core #92616
Issue #9089 has been updated by irxground (Daichi Ota).
I felt uncomfortable with the behavior of `rb_num2ull`. I don't know if it is correct to comment on this ticket, but it seemed to be similar.
The current behavior of `rb_num2ll` is as follows.
|range|behavior|
|---|---|
| val < -2^63 | raise an error |
| -2^63 <= val < 2^63 | correct value |
| 2^63 < val | raise an error |
The behavior of `rb_num2ull` is as follows.
|range|behavior|
|---|---|
| val < -2^63 | raise an error |
| -2^63 <= val < 0 | overflow |
| 0 <= val < 2^64 | correct value |
| 2^64 < val | raise an error |
I think it's inconsistent, so it's nice to fix it.
----------------------------------------
Bug #9089: rb_fix2uint no longer raises a RangeError when given negative values
https://bugs.ruby-lang.org/issues/9089#change-77975
* Author: NoKarma (Arthur Schreiber)
* Status: Rejected
* Priority: Normal
* Assignee:
* Target version: 2.2.0
* ruby -v: ruby 2.1.0dev (2013-11-07 trunk 43560)
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN
----------------------------------------
Up until the change that was made in ((<URL:https://github.com/ruby/ruby/commit/92f59c6d7937b14bb5eefb052099ef0a3ef3bcd0>)), (({rb_fix2uint})) would raise a (({RangeError})) if it was given a negative value like (({-1})) (e.g. when using the (({FIX2UINT})) macro).
Due to the changes made in that commit, this error is no longer raised and (({rb_fix2uint})) will return an incorrect value instead.
There is a C-API spec in rubyspec that shows that this behavior has changed between 2.0.0-p247 and 2.1.0-preview1, and I checked and made sure this is still not working correctly in the latest 2.1.0-dev version. The failing spec can be found at ((<URL:https://github.com/rubyspec/rubyspec/blob/master/optional/capi/fixnum_spec.rb#L16-L18>)), it is part of the "optional" c-api specs.
Is there any reason why there is the (({if (num < (unsigned long)INT_MIN)})) is made inside the (({check_uint})) function? Doesn't the (({sign})) parameter automatically indicate that we can't convert to an unsigned integer?
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>