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

Add method! and public_send! for OpenStruct warnings #7524

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/src/main/java/org/jruby/RubyKernel.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.Map;

import jnr.constants.platform.Errno;
Expand Down Expand Up @@ -73,6 +74,7 @@
import org.jruby.runtime.CallType;
import org.jruby.runtime.Helpers;
import org.jruby.runtime.JavaSites.KernelSites;
import org.jruby.runtime.MethodIndex;
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.Visibility;
import org.jruby.runtime.backtrace.RubyStackTraceElement;
Expand Down Expand Up @@ -153,6 +155,9 @@ public static RubyModule createKernelModule(Ruby runtime) {
module.defineAnnotatedMethods(LoopMethods.class);
}

MethodIndex.METHOD_FRAME_READS.put("method!", EnumSet.of(SCOPE));
MethodIndex.METHOD_FRAME_READS.put("public_send!", EnumSet.of(SCOPE));

recacheBuiltinMethods(runtime, module);

return module;
Expand Down