Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

Ruby | Proc | to_s

概要

Proc#to_s -> String

詳細

self の文字列表現を返却。

サンプルコード
p Proc.new {}.to_s
{}.to_s

出力

"#<Proc:0x2a8b770@/path/to/your/script.rb:1>"