> What exactly are trying to achieve?

I have class A that derives from class B

A#parse and A#parse! override members of the same name in B

A#parse and A#parse! both call A#do_parse to retrieve arguments from the 
command line in a loop. A yield in A#do_parse returns the arguments 
(argv). I want to call 'super argv' from both A#parse and A#parse! but 
super is not set to A#super.

# simplified...
class A < B
...

def parse
   do_parse {|a| super a}
end

def parse!
   do_parse {|a| super a}
def

def do_parse
   argv = gets.strip.to_a
   return ['-x'] if argv.index '-x'
   return ['-h'] if argv.empty?
   yield argv
end
protected :do_parse

...
end
-- 
Posted via http://www.ruby-forum.com/.