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

#inspect should not output negative object IDs. #651

Merged
merged 1 commit into from Feb 21, 2018

Conversation

voxik
Copy link
Contributor

@voxik voxik commented Apr 27, 2017

It might happen that object ID is 'negative', since Ruby tries to avoid Bignums:

https://bugs.ruby-lang.org/issues/13397

However, I am not sure if this does not break any precondition for the fec11e7 commit which introduced one of the #inspect methods. But I am using Kernel#to_s (as suggested by @nobu) instead of #inspect, so hopefully this is correct ...

meineerde added a commit to meineerde/rackstash that referenced this pull request Jul 18, 2017
Sometimes, object_ids are created as signed Integers which are invalid
in `inspect`. By using the default implementation of `Object#to_s`, we
can get valid object_ids the same way Ruby itself would have created
them.

For a motivation of this change, see

* https://bugs.ruby-lang.org/issues/13397
* ruby-concurrency/concurrent-ruby#651
It might happen that object ID is 'negative', since Ruby tries to avoid Bignums:

https://bugs.ruby-lang.org/issues/13397
@pitr-ch
Copy link
Member

pitr-ch commented Feb 21, 2018

Thanks @voxik, rebasing and merging when CI passes

@pitr-ch pitr-ch merged commit fcf8925 into ruby-concurrency:master Feb 21, 2018
@ghost ghost removed the in progress label Feb 21, 2018
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.

None yet

2 participants