Skip to content

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)

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?

See also .lex_compat .load