From: Gennady Bystritsky Date: 2010-03-31T16:08:09+09:00 Subject: Re: Ruby Koans: will this method ever return :empty? On Mar 30, 2010, at 11:38 PM, sl4m wrote: > I'm having trouble understanding the return statement for this particular > koan: > > class MessageCatcher > def add_a_payload(*args) In this case (with *) args is always an array that holds all the arguments passed to the method, it being empty when no arguments are given. So it should be: > return :empty unless args return :empty if args.empty? > args > end > end > > mc = MessageCatcher.new > mc.add_a_payload # [] > mc.add_a_payload(1) # [1] > > Is it possible to have this method return :empty? > > > skim