1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
From ed7340c7439b49f952c9ede885dc8807641773e3 Mon Sep 17 00:00:00 2001
From: Tobias Kunze <r@rixx.de>
Date: Sat, 9 Nov 2024 10:55:28 +0100
Subject: [PATCH] Make sure svg plot is not deleted
needed for ruby3.3, taken from https://github.com/blinry/nom/pull/20
---
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 @@ module Nom
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"))
--
2.47.2
|