class Proc
def to_ruby
def to_ruby ruby = self.to_method.to_ruby ruby.sub!(/\A(def \S+)\(([^\)]*)\)/, '\1 |\2|') # move args ruby.sub!(/\Adef[^\n\|]+/, 'proc { ') # strip def name ruby.sub!(/end\Z/, '}') # strip end ruby.gsub!(/\s+$/, '') # trailing WS bugs me ruby end