Copying data from a running ruby ​​script

I have a long ruby ​​script on Linux that has interesting data stored in a hash table. There is no storage mechanism in the program and I am interested in copying data from a hash table. Is there a way to copy data from memory of a running ruby ​​script?

Rajah

+2


source to share


2 answers


This is not for the faint of heart, but there is a tool called Hijack that can give you a live irb prompt to start a ruby ​​process. RubyInside has a very quick rundown and example of how to use this .



+7


source


It would be very easy to add a signal handler that responds by dumping the serialized version of your hash table.



See Signal.trap .

0


source







All Articles