From: why the lucky stiff Date: 2004-03-15T03:42:08+09:00 Subject: Re: Kernel#y On Sun, 14 Mar 2004, Joel VanderWerf wrote: >Two suggestions for Kernel#y: > >1. Make it private, like Kernel#p. ok, done. >2. Let it take multiple args, like Kernel#p, something like: > >irb> y 1,2,3 >--- 1 >--- 2 >--- 3 >=> nil and, yes, as well. very good, thank you. checked into syck cvs now. ruby 1.9 branch shortly. Ara.T.Howard wrote: > > definitely should be changed to > > def y(*args) > args.each{|a| super a} > end > close, instead let's output multiple inputs as a YAML stream, with each having their own document: module Kernel def y( *x ) puts( if x.length == 1 YAML::dump( *x ) else YAML::dump_stream( *x ) end ) end private :y end works the same, but allows Kernel#y to dump headless documents if only one input is sent. great suggestions, cool, cool... _why