Project

General

Profile

Feature #4046

Updated by naruse (Yui NARUSE) over 12 years ago

=begin 
  
  In a debugger often one gets to a state where one just wants to restart everything exactly the way the program was previously invoked.  
 
  It would helpful if Ruby saved **argv and cwd.  
 
  The attached patch saves these in RubyVM::OS_ARGV and RubyVM::OS_STARTUP_DIR. With this, 
  if a Ruby program wants to restart itself, it can run: 
 
    chdir RubyVM::OS_STARTUP_DIR 
    exec(*RubyVM::OS_ARGV) 
 
 =end 
 

Back