File: 0003-Make-sure-svg-plot-is-not-deleted.patch

package info (click to toggle)
nom 0.1.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 260 kB
  • sloc: ruby: 650; makefile: 10
file content (29 lines) | stat: -rw-r--r-- 866 bytes parent folder | download
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