History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1848
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Charles Oliver Nutter
Reporter: Vladimir Sizikov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JRuby

Bignum#[] should not throw exceptions even when the argument is very big

Created: 30/Dec/07 11:41 AM   Updated: 23/Apr/08 10:03 AM
Component/s: Core Classes/Modules
Affects Version/s: JRuby 1.1+
Fix Version/s: JRuby 1.1RC1

Time Tracking:
Not Specified

File Attachments: 1. Text File bignum-aref-exception.patch (2 kb)

Environment: Latest JRuby 1.1b1

Testcase included: yes
Patch Submitted: Yes


 Description  « Hide
This is a bit silly, but in the name of compatibility...

The following example:


(2**64)[2**32]

{nofarmat}

returns 0 in MRI, Rubinius.

But raises an exception in JRuby:
RangeError: integer 4294967295 too big to convert to `int'

This leads to one rubinius spec failure for bignum.

The proposed patch fixes the problem, and the spec failure.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Charles Oliver Nutter - 30/Dec/07 12:04 PM
Fixed in 5443. Thanks!