class UnboundMethod
def to_ruby
def to_ruby name = ProcStoreTmp.name ProcStoreTmp.send(:define_method, name, self) m = ProcStoreTmp.new.method(name) result = m.to_ruby.sub(/def #{name}(?:\(([^\)]*)\))?/, 'proc { |\1|').sub(/end\Z/, '}') return result end