From: Michael Neumann Date: 2001-07-28T02:48:52+09:00 Subject: [ruby-talk:18650] Re: Converting | to a Proc object? Emil Ong wrote: > irb(main):002:0> [].|.to_proc > ArgumentError: wrong # of arguments(0 for 1) > from (irb):2:in `|' > from (irb):2 > irb(main):003:0> ([].|).to_proc > ArgumentError: wrong # of arguments(0 for 1) > from (irb):3:in `|' > from (irb):3 You have to create a Method object before. [].method(:|).to_proc Note that the proc is bound to the object []. Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de