Skip to content

Commit f1c1e5f

Browse files
committed
Fix Kernel#respond_to? for protected methods and untag tests.
PullRequest: truffleruby/630
2 parents b53957f + d43a021 commit f1c1e5f

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Bug fixes:
2525
* `Array#each` now behaves like MRI when the array is modified (#1580).
2626
* Clarified that `$SAFE` can never be set to a non-zero value.
2727
* Fix compatibility with RubyGems 3 (#1558).
28+
* `Kernel#respond_to?` now returns false if a method is protected and
29+
the `include_all` argument is false (#1568).
2830

2931
Changes:
3032

spec/tags/core/kernel/respond_to_missing_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/tags/core/kernel/respond_to_tags.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/main/java/org/truffleruby/language/dispatch/DoesRespondDispatchHeadNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static DoesRespondDispatchHeadNode createPublic() {
2424
}
2525

2626
private DoesRespondDispatchHeadNode(boolean ignoreVisibility) {
27-
super(ignoreVisibility, false, MissingBehavior.RETURN_MISSING, DispatchAction.RESPOND_TO_METHOD);
27+
super(ignoreVisibility, !ignoreVisibility, MissingBehavior.RETURN_MISSING, DispatchAction.RESPOND_TO_METHOD);
2828
}
2929

3030
/**

0 commit comments

Comments
 (0)