Skip to content

Commit 7d902fb

Browse files
committed
Ignore static InteropLibrary methods for Primitive.interop_library_all_methods
1 parent df6d1b8 commit 7d902fb

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

spec/truffle/interop/methods_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
describe "Truffle::Interop" do
1414
it "has a method for each InteropLibrary message" do
1515
all_methods = Primitive.interop_library_all_methods
16-
all_methods -= %w[getFactory getUncached]
1716
expected = all_methods.map do |name|
1817
name = name.gsub(/([a-z])([A-Z])/) { "#{$1}_#{$2.downcase}" }
1918
if name.start_with?('is_', 'has_', 'fits_')

src/main/java/org/truffleruby/interop/InteropNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected RubyArray allMethodsOfInteropLibrary() {
123123
private static String[] publicInteropLibraryMethods() {
124124
List<String> methods = new ArrayList<>();
125125
for (Method method : InteropLibrary.class.getDeclaredMethods()) {
126-
if (Modifier.isPublic(method.getModifiers())) {
126+
if (Modifier.isPublic(method.getModifiers()) && !Modifier.isStatic(method.getModifiers())) {
127127
if (!methods.contains(method.getName())) {
128128
methods.add(method.getName());
129129
}

0 commit comments

Comments
 (0)