Commit 4fa741f
committed
Remove use of finalizer in Rack::Test::UploadedFile (Fixes #338)
A finalizer was used in the Tempfile case to close and unlink the
Tempfile created, but it was never needed, because Tempfile defines
its own finalizer that closes and unlinks.
Update the spec so that it actually tests that tempfiles are getting
removed and unlinked. This uses 500 tempfiles in the JRuby test
because some lower values I tried failed CI. CRuby could likely get
away with only a handle of tempfiles, but the spec uses 50 to be
sure it doesn't fail.1 parent 822541d commit 4fa741f
File tree
3 files changed
+24
-34
lines changed- lib/rack/test
- spec/rack/test
3 files changed
+24
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
1 | 9 | | |
2 | 10 | | |
3 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 75 | | |
88 | 76 | | |
89 | 77 | | |
| |||
104 | 92 | | |
105 | 93 | | |
106 | 94 | | |
107 | | - | |
108 | | - | |
109 | 95 | | |
110 | 96 | | |
111 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
61 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 70 | + | |
| 71 | + | |
71 | 72 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 73 | + | |
| 74 | + | |
76 | 75 | | |
77 | 76 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 77 | + | |
| 78 | + | |
83 | 79 | | |
84 | 80 | | |
85 | 81 | | |
| |||
0 commit comments