Bignum failing specs #661

Merged
merged 3 commits into from Apr 27, 2013

Projects

None yet

2 participants

@tychobrailleur
Contributor

This pull request fixes 7 failures in the bignum rubyspecs, specifically for === and to_s.

tychobrailleur added some commits Apr 27, 2013
@tychobrailleur tychobrailleur '==' behaves like '===' in ruby 1.9.
This fixes the bignum/case_compare_spec.rb rubyspec.

It seems however that this behaviour changed again in 2.0.
Compare:
```
1.9.3p362 :001 > b =  0x8000_0000_0000_0000 + 10
 => 9223372036854775818
1.9.3p362 :002 > b === b.to_f
 => true
1.9.3p362 :003 > puts RUBY_VERSION
1.9.3
 => nil
```

to

```
irb(main):001:0> b =  0x8000_0000_0000_0000 + 10
=> 9223372036854775818
irb(main):002:0> b === b.to_f
=> false
irb(main):003:0> puts RUBY_VERSION
2.0.0
=> nil
```
56a62c3
@tychobrailleur tychobrailleur '===' differs from 'eql?' in ruby 1.9. a2163ca
@tychobrailleur tychobrailleur Bignum#to_s returns a US-ASCII encoded string.
This fixes bignum/to_s_spec.rb failures.
26be0c5
@headius
Member
headius commented Apr 27, 2013

Ahh very nice! I almost looked into these the other night, but thanks very much for taking care of them!

@headius headius merged commit 119fbd8 into jruby:master Apr 27, 2013

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment