History is not saved

Why is my irb story no longer saved?

0
ruby irb
Nov 17 '09 at 22:55
source share
1 answer

It turns out that ruby ​​1.8.7 introduced an error in which finalizers are no longer guaranteed.

To solve this problem, I added the following code snippet to the .irbrc file:

require 'irb/ext/save-history' Kernel.at_exit do IRB::HistorySavingAbility.create_finalizer.call(IRB.CurrentContext.instance_variable_get(:@io).send(:binding)) end 
+2
Nov 17 '09 at 22:57
source share



All Articles