Skip to content

Fix setting AtomicReferenceImplementation on TruffleRuby #925

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

Merged
merged 1 commit into from
Nov 1, 2021

Conversation

eregon
Copy link
Collaborator

@eregon eregon commented Oct 22, 2021

  • This accidentally worked before because until Ruby 2.7 alias_method returns the receiver.
  • In Ruby 3 however, alias_method returns the first argument.
$ ruby -ve 'p class C; alias_method :id, :object_id; end'
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux]
C
$ chruby 3.0.2                                           
$ ruby -ve 'p class C; alias_method :id, :object_id; end'
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
:id

This is blocking to implement the change about alias_method;s return value in oracle/truffleruby#2499.
Could you make a bug fix release with this fix soon if possible?

cc @pitr-ch

* This accidentally worked before because until Ruby 2.7 `alias_method` returns the receiver.
* In Ruby 3 however, `alias_method` returns the first argument.
@eregon
Copy link
Collaborator Author

eregon commented Oct 22, 2021

For the anecdote, I noticed this originated from 877dc76, which worked accidentally because include returns the receiver (still does in Ruby 3).

@eregon
Copy link
Collaborator Author

eregon commented Nov 1, 2021

@pitr-ch or other concurrent-ruby maintainers, could you merge this?

@jdantonio jdantonio merged commit 00232e3 into ruby-concurrency:master Nov 1, 2021
@jdantonio
Copy link
Member

@eregon I've given you write permissions. <3

@eregon
Copy link
Collaborator Author

eregon commented Nov 1, 2021

Thank you!

It would be great to have a release including this when maintainers have some time.
For now I made a patch in TruffleRuby (oracle/truffleruby@5ea0bc2), but it is quite messy, so a release of concurrent-ruby would be much better and the patch would not be needed/have no effect when using latest concurrent-ruby.

@eregon eregon deleted the patch-3 branch November 1, 2021 17:40
@jdantonio
Copy link
Member

I've been out of the loop for a long time (I only lurk) so I'm hesitant to do a release myself. I'd be fine giving you and @chrisseaton access to RubyGems so that you can both make releases, but I think I'd be overstepping my bounds a bit right now. Hopefully @pitr-ch can jump in soon and give hi sthoughts.

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.

2 participants