From: "Jan E." Date: 2012-05-12T05:42:52+09:00 Subject: Re: Why do you think of NilClass#to_proc? Hi, Thomas Sawyer wrote in post #1060469: > I have two minds about using a NilClass#to_proc > > class NilClass > def to_proc > Proc.new{ |*a| a } > end > end > > Or > > class NilClass > def to_proc > Proc.new{ nil } > end > end > > Which makes the most sense? The second solution seems more intuitive to me, since it's a kind of "empty proc": all parameters are discarded and the proc returns nil. But like Bartosz already said: What's the use case for this feature? -- Posted via http://www.ruby-forum.com/.