From: "ko1 (Koichi Sasada)" <redmine@...>
Date: 2012-10-27T05:52:46+09:00
Subject: [ruby-core:48344] [ruby-trunk - Feature #4046] Saving C's **argv and cwd allows Ruby programs to reliably restart themselves


Issue #4046 has been updated by ko1 (Koichi Sasada).

Target version changed from 2.0.0 to next minor

I changed target to next minor because no feedback.

----------------------------------------
Feature #4046: Saving C's **argv and cwd allows Ruby programs to reliably restart themselves
https://bugs.ruby-lang.org/issues/4046#change-31653

Author: rocky (Rocky Bernstein)
Status: Feedback
Priority: Normal
Assignee: 
Category: 
Target version: next minor


=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



-- 
http://bugs.ruby-lang.org/