From ed7340c7439b49f952c9ede885dc8807641773e3 Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Sat, 9 Nov 2024 10:55:28 +0100 Subject: [PATCH] Make sure svg plot is not deleted --- lib/nom/nom.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/nom/nom.rb b/lib/nom/nom.rb index c9fb721..2c11951 100644 --- a/lib/nom/nom.rb +++ b/lib/nom/nom.rb @@ -190,9 +190,8 @@ def plot end input_dat.close - svg = Tempfile.new(["plot", ".svg"]) + svg = Tempfile.create(["plot", ".svg"]) svg.close - ObjectSpace.undefine_finalizer(svg) # prevent the svg file from being deleted plt_erb = IO.read(File.join(File.dirname(File.expand_path(__FILE__)), "nom.plt.erb"))