From: kjana@...4lab.to (YANAGAWA Kazuhisa) Date: 2002-03-20T00:37:32+09:00 Subject: Re: getoptlong help sample thanks In message ravinray@hotmail.com writes: > opts.each do |opt, arg| > > begin (snip) > puts opt > puts "After options\n" > end > puts "Also After options" > end # Your mail agent may strip tabs.... Probably you tricked yourself by incorrect indentation. The `end' next of the `puts "After options"' matches `begin', so the statement `puts "Also...."' is still in the block given to opts.each. When no options are supplied, opts.each does not evaluate the block. Thus puts's in the block is never called. # NOTE: the `puts "Before options"' line is out of the block. Add `puts "rest of ARGV == #{ARGV.inspect}"' at the end of the script, and you see an output. -- kjana@dm4lab.to March 20, 2002 The more haste, the less speed.