Skip to content

Fix some specs regarding method visibility#6712

Merged
headius merged 1 commit intojruby:masterfrom
edipofederle:fix-copy-initialize-visibility
Jun 14, 2021
Merged

Fix some specs regarding method visibility#6712
headius merged 1 commit intojruby:masterfrom
edipofederle:fix-copy-initialize-visibility

Conversation

@edipofederle
Copy link
Contributor

@edipofederle edipofederle commented Jun 9, 2021

Untag some tests regarding method visibility. Also closes #596.

@edipofederle edipofederle force-pushed the fix-copy-initialize-visibility branch from 9a5a81d to 1ba40bb Compare June 9, 2021 17:20
Copy link
Member

@enebo enebo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the functional part of this PR is that if clazz is a singleton it will return public which does seems to match vm_define_method in MRI. This PR with only the singleton check of the if statement may be what you want (although we should be able to see some test/spec pass too as a result).

I am not sure what NO_SUPER_CLASS and NOT_IMPLEMENTED checks are for? They are not doing what you expect but if you explain what you think they are doing I can maybe help you do the right thing. NO_SUPER_CLASS.toString() -> "NO_SUPER_CLASS" which would only have an effect if your Ruby method was named that.

You can ping me or @headius on matrix to talk about this. Deciphering our codebase and MRI's codebase can be tricky at times :)

@edipofederle edipofederle force-pushed the fix-copy-initialize-visibility branch 9 times, most recently from f1bc12c to aba9d7c Compare June 14, 2021 18:46
@edipofederle edipofederle marked this pull request as ready for review June 14, 2021 21:18
@edipofederle edipofederle force-pushed the fix-copy-initialize-visibility branch from aba9d7c to 727d620 Compare June 14, 2021 21:26
@edipofederle edipofederle force-pushed the fix-copy-initialize-visibility branch from 727d620 to 2632240 Compare June 14, 2021 21:27
@edipofederle edipofederle changed the title Align performNormalMethodChecksAndDetermineVisibility with MRI impl… Fix some specs regarding method visibility Jun 14, 2021
Copy link
Member

@headius headius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me. Concur with @enebo that the main change here is to use public visibility for singleton classes.

@headius headius added this to the JRuby 9.3.0.0 milestone Jun 14, 2021
@headius headius merged commit 3495fdc into jruby:master Jun 14, 2021
@edipofederle edipofederle deleted the fix-copy-initialize-visibility branch June 15, 2021 00:23
@headius headius mentioned this pull request Sep 22, 2021
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.

Adding a method to eigenclass doesn't work properly. Works in cruby

3 participants