]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/5076'
authorTom Hughes <tom@compton.nu>
Wed, 14 Aug 2024 17:57:05 +0000 (18:57 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 14 Aug 2024 17:57:05 +0000 (18:57 +0100)
.github/workflows/tests.yml
config/initializers/gd2.rb [new file with mode: 0644]

index 34405f778d0672bf5a350c16e135211d3df67e0d..46ab75482815eb90b5d9aa23f7a8ac8e4418f6f5 100644 (file)
@@ -11,7 +11,7 @@ jobs:
     strategy:
       matrix:
         ubuntu: [20.04, 22.04]
-        ruby: ['3.0', '3.1', '3.2']
+        ruby: ['3.0', '3.1', '3.2', '3.3']
     runs-on: ubuntu-${{ matrix.ubuntu }}
     env:
       RAILS_ENV: test
diff --git a/config/initializers/gd2.rb b/config/initializers/gd2.rb
new file mode 100644 (file)
index 0000000..0005bd8
--- /dev/null
@@ -0,0 +1,15 @@
+module OpenStreetMap
+  module GD2
+    module AnimatedGif
+      def frames_finalizer
+        proc do
+          @frames.each do |frame|
+            ::GD2::GD2FFI.send(:gdFree, frame.ptr)
+          end
+        end
+      end
+    end
+  end
+end
+
+GD2::AnimatedGif.prepend(OpenStreetMap::GD2::AnimatedGif)