Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Ruby::Prism.find
find(callable)
lib/ruby/prism.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/ruby/prism.rb, line 94
def self.find(callable)
NodeFind.find(callable)
end
Given a Method, UnboundMethod, Proc, or Thread::Backtrace::Location, returns the Ruby::Prism node representing it. On CRuby, this uses node_id for an exact match. On other implementations, it falls back to best-effort matching by source location line number.
: (Method | UnboundMethod | Proc | Thread::Backtrace::Location callable) -> Node?