Skip to content

Commit d772d8a

Browse files
committed
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.
1 parent e93e44a commit d772d8a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/java/org/jruby/ext/psych/PsychEmitter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ public IRubyObject start_document(ThreadContext context, IRubyObject _version, I
149149
}
150150
}
151151

152-
SpecVersion version = new SpecVersion(1, 2);
153152
Map<String, String> tagsMap = new HashMap<>();
154153

155154
if (!tags.isNil()) {
@@ -172,7 +171,7 @@ public IRubyObject start_document(ThreadContext context, IRubyObject _version, I
172171
}
173172
}
174173

175-
DocumentStartEvent event = new DocumentStartEvent(!implicitBool, Optional.ofNullable(version), tagsMap, NULL_MARK, NULL_MARK);
174+
DocumentStartEvent event = new DocumentStartEvent(!implicitBool, Optional.empty(), tagsMap, NULL_MARK, NULL_MARK);
176175
emit(context, event);
177176
return this;
178177
}

0 commit comments

Comments
 (0)