diffstat for ruby-psych-5.0.2 ruby-psych-5.0.2

 changelog                |    9 +++++++++
 control                  |    4 ++--
 patches/series           |    1 +
 patches/snakeyaml2.patch |   33 +++++++++++++++++++++++++++++++++
 4 files changed, 45 insertions(+), 2 deletions(-)

diff -Nru ruby-psych-5.0.2/debian/changelog ruby-psych-5.0.2/debian/changelog
--- ruby-psych-5.0.2/debian/changelog	2024-08-22 00:11:16.000000000 +0300
+++ ruby-psych-5.0.2/debian/changelog	2025-12-01 17:32:27.000000000 +0200
@@ -1,3 +1,12 @@
+ruby-psych (5.0.2-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Pierre Gruet ]
+  * Fix building against snakeyaml 2.x. (Closes: #1117952)
+
+ -- Adrian Bunk <bunk@debian.org>  Mon, 01 Dec 2025 17:32:27 +0200
+
 ruby-psych (5.0.2-3) unstable; urgency=medium
 
   * Team upload.
diff -Nru ruby-psych-5.0.2/debian/control ruby-psych-5.0.2/debian/control
--- ruby-psych-5.0.2/debian/control	2024-08-22 00:10:58.000000000 +0300
+++ ruby-psych-5.0.2/debian/control	2025-12-01 17:32:26.000000000 +0200
@@ -11,7 +11,7 @@
                jruby (>= 9.1.6.0~),
                libjcodings-java,
                libyaml-dev,
-               libyaml-snake-java (>= 1.23~),
+               libyaml-snake-java (>= 2.5+ds),
                rake,
                rake-compiler
 Standards-Version: 4.7.0
@@ -42,7 +42,7 @@
 Architecture: all
 Depends: jruby (>= 9.1.6.0~),
          libjcodings-java,
-         libyaml-snake-java (>= 1.23~),
+         libyaml-snake-java (>= 2.5+ds),
          ${misc:Depends}
 Description: ruby-psych Java extension
  ruby-psych is a YAML parser and emitter. Psych leverages libyaml for its
diff -Nru ruby-psych-5.0.2/debian/patches/series ruby-psych-5.0.2/debian/patches/series
--- ruby-psych-5.0.2/debian/patches/series	2024-08-22 00:06:42.000000000 +0300
+++ ruby-psych-5.0.2/debian/patches/series	2025-12-01 17:32:26.000000000 +0200
@@ -2,3 +2,4 @@
 0002-Remove-snakeyaml-hardcoded-versions.patch
 0003-Disable-ruby-maven.patch
 0004-Fix-RestrictedYAMLTree-allowing-the-Symbol-class-sho.patch
+snakeyaml2.patch
diff -Nru ruby-psych-5.0.2/debian/patches/snakeyaml2.patch ruby-psych-5.0.2/debian/patches/snakeyaml2.patch
--- ruby-psych-5.0.2/debian/patches/snakeyaml2.patch	1970-01-01 02:00:00.000000000 +0200
+++ ruby-psych-5.0.2/debian/patches/snakeyaml2.patch	2025-12-01 17:32:26.000000000 +0200
@@ -0,0 +1,33 @@
+Description: using ScannerImpl to provide StreamReader to ParserImpl, due to
+ changes in the interface of snakeyaml
+Author: Pierre Gruet <pgt@debian.org>
+Forwarded: no
+Last-Update: 2025-10-12
+
+--- a/ext/java/org/jruby/ext/psych/PsychParser.java
++++ b/ext/java/org/jruby/ext/psych/PsychParser.java
+@@ -62,6 +62,7 @@
+ import org.jruby.util.IOInputStream;
+ import org.jruby.util.io.EncodingUtils;
+ import org.yaml.snakeyaml.DumperOptions;
++import org.yaml.snakeyaml.LoaderOptions;
+ import org.yaml.snakeyaml.error.Mark;
+ import org.yaml.snakeyaml.error.MarkedYAMLException;
+ import org.yaml.snakeyaml.error.YAMLException;
+@@ -79,6 +80,7 @@
+ import org.yaml.snakeyaml.reader.ReaderException;
+ import org.yaml.snakeyaml.reader.StreamReader;
+ import org.yaml.snakeyaml.scanner.ScannerException;
++import org.yaml.snakeyaml.scanner.ScannerImpl;
+ 
+ import static org.jruby.runtime.Helpers.arrayOf;
+ import static org.jruby.runtime.Helpers.invoke;
+@@ -204,7 +206,7 @@
+         Ruby runtime = context.runtime;
+ 
+         try {
+-            parser = new ParserImpl(readerFor(context, yaml));
++            parser = new ParserImpl(new ScannerImpl(readerFor(context, yaml), new LoaderOptions()));
+ 
+             if (path.isNil() && yaml.respondsTo("path")) {
+                 path = sites[Call.path.ordinal()].call(context, this, yaml);
