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

Bignum failing specs #661

Merged
merged 3 commits into from Apr 27, 2013

Conversation

Projects
None yet
2 participants
@tychobrailleur
Copy link
Contributor

tychobrailleur commented Apr 27, 2013

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

tychobrailleur added some commits Apr 27, 2013

'==' 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
```
Bignum#to_s returns a US-ASCII encoded string.
This fixes bignum/to_s_spec.rb failures.
@headius

This comment has been minimized.

Copy link
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 added a commit that referenced this pull request Apr 27, 2013

@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
You can’t perform that action at this time.