summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Oliver Nutter <headius@headius.com>2023-01-13 08:47:23 -0600
committerCharles Oliver Nutter <headius@headius.com>2023-01-13 08:47:23 -0600
commitd772d8a94d4400c88f06f757fc448d40755c09a3 (patch)
tree30bcc0b38d70297782abc87dc6ff2948bc03b232
parente93e44a627d781960847493a49405e014deb29b8 (diff)
downloadpsych-d772d8a94d4400c88f06f757fc448d40755c09a3.tar.gz
Omit specc version from document start
This eliminates the %YAML 1.2 directive at the start of each emit, which improves tests passing but also breaks a few tests that *expect* the YAML directive to be present.
-rw-r--r--ext/java/org/jruby/ext/psych/PsychEmitter.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/java/org/jruby/ext/psych/PsychEmitter.java b/ext/java/org/jruby/ext/psych/PsychEmitter.java
index 5e680d1..2ad1251 100644
--- a/ext/java/org/jruby/ext/psych/PsychEmitter.java
+++ b/ext/java/org/jruby/ext/psych/PsychEmitter.java
@@ -149,7 +149,6 @@ public class PsychEmitter extends RubyObject {
}
}
- SpecVersion version = new SpecVersion(1, 2);
Map<String, String> tagsMap = new HashMap<>();
if (!tags.isNil()) {
@@ -172,7 +171,7 @@ public class PsychEmitter extends RubyObject {
}
}
- DocumentStartEvent event = new DocumentStartEvent(!implicitBool, Optional.ofNullable(version), tagsMap, NULL_MARK, NULL_MARK);
+ DocumentStartEvent event = new DocumentStartEvent(!implicitBool, Optional.empty(), tagsMap, NULL_MARK, NULL_MARK);
emit(context, event);
return this;
}