!8 [sync] PR-2: Fix build failure due to snakeyaml update to 1.32

From: @openeuler-sync-bot 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2023-03-13 02:44:44 +00:00 committed by Gitee
commit 8b3bf545ed
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 36 additions and 6 deletions

View File

@ -0,0 +1,30 @@
diff --git a/core/src/main/java/org/jruby/ext/psych/PsychEmitter.java b/core/src/main/java/org/jruby/ext/psych/PsychEmitter.java
index d9f3231..4a0ba0d 100644
--- a/core/src/main/java/org/jruby/ext/psych/PsychEmitter.java
+++ b/core/src/main/java/org/jruby/ext/psych/PsychEmitter.java
@@ -330,7 +330,7 @@ public class PsychEmitter extends RubyObject {
DumperOptions options = new DumperOptions();
IRubyObject io;
- private static final Mark NULL_MARK = new Mark(null, 0, 0, 0, null, 0);
+ private static final Mark NULL_MARK = new Mark((String) null, 0, 0, 0, (String) null, 0);
// Map style constants from Psych values (ANY = 0 ... FOLDED = 5)
// to SnakeYaml values; see psych/nodes/scalar.rb.
diff --git a/core/src/main/java/org/jruby/ext/psych/PsychParser.java b/core/src/main/java/org/jruby/ext/psych/PsychParser.java
index 33a98b5..7cff388 100644
--- a/core/src/main/java/org/jruby/ext/psych/PsychParser.java
+++ b/core/src/main/java/org/jruby/ext/psych/PsychParser.java
@@ -345,10 +345,10 @@ public class PsychParser extends RubyObject {
}
}
- private static int translateFlowStyle(Boolean flowStyle) {
+ private static int translateFlowStyle(DumperOptions.FlowStyle flowStyle) {
if (flowStyle == null) return 0; // any
- if (flowStyle) return 2;
+ if (flowStyle.getStyleBoolean()) return 2;
return 1;
}

View File

@ -3,7 +3,7 @@
%global rubygems_dir %{_datadir}/rubygems %global rubygems_dir %{_datadir}/rubygems
Name: jruby Name: jruby
Version: 1.7.22 Version: 1.7.22
Release: 1 Release: 2
Summary: Pure Java implementation of the Ruby interpreter Summary: Pure Java implementation of the Ruby interpreter
License: (CPL or GPLv2+ or LGPLv2+) and BSD and (GPLv2 or Ruby) and (BSD or Ruby) License: (CPL or GPLv2+ or LGPLv2+) and BSD and (GPLv2 or Ruby) and (BSD or Ruby)
URL: http://jruby.org URL: http://jruby.org
@ -12,6 +12,7 @@ Patch0: jruby-add-classpath-to-start-script.patch
Patch1: jruby-include-unbundled-jansi.patch Patch1: jruby-include-unbundled-jansi.patch
Patch2: jruby-remove-rubygems-dirs-definition.patch Patch2: jruby-remove-rubygems-dirs-definition.patch
Patch3: jruby-snakeyaml-1.16.patch Patch3: jruby-snakeyaml-1.16.patch
Patch4: jruby-snakeyaml-1.20.patch
BuildRequires: maven-local mvn(bsf:bsf) mvn(com.github.jnr:jffi) BuildRequires: maven-local mvn(bsf:bsf) mvn(com.github.jnr:jffi)
BuildRequires: mvn(com.github.jnr:jffi::native:) mvn(com.github.jnr:jnr-constants) BuildRequires: mvn(com.github.jnr:jffi::native:) mvn(com.github.jnr:jnr-constants)
BuildRequires: mvn(com.github.jnr:jnr-enxio) mvn(com.github.jnr:jnr-ffi) BuildRequires: mvn(com.github.jnr:jnr-enxio) mvn(com.github.jnr:jnr-ffi)
@ -57,11 +58,7 @@ Summary: Javadoc for %{name}
Javadoc for %{name}. Javadoc for %{name}.
%prep %prep
%setup -q %autosetup -p1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
find -name "*.exe" -delete find -name "*.exe" -delete
find -name "*.dll" -delete find -name "*.dll" -delete
find -name ".gitignore" -delete find -name ".gitignore" -delete
@ -138,5 +135,8 @@ EOF
%doc COPYING LICENSE.RUBY LEGAL %doc COPYING LICENSE.RUBY LEGAL
%changelog %changelog
* Thu Mar 09 2023 yaoxin <yaoxin30@h-partners.com> - 1.7.22-2
- Fix build failure due to snakeyaml update to 1.32
* Mon Aug 24 2020 wangchong <wangchong56@huawei.com> - 1.7.22-1 * Mon Aug 24 2020 wangchong <wangchong56@huawei.com> - 1.7.22-1
- package init - package init