Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Proc#to_proc

() -> self
prc.to_proc → proc

Part of the protocol for converting objects to Proc objects. Instances of class Proc simply return themselves.

See also #syntax_tree #to_s #source_range #yield also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0