File: proper_string_split.patch

package info (click to toggle)
kwalify 0.7.2-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 2,352 kB
  • sloc: ruby: 8,428; xml: 170; makefile: 37; java: 36
file content (26 lines) | stat: -rw-r--r-- 976 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Index: kwalify/lib/kwalify/yaml-parser.rb
===================================================================
--- kwalify.orig/lib/kwalify/yaml-parser.rb
+++ kwalify/lib/kwalify/yaml-parser.rb
@@ -34,7 +34,7 @@ module Kwalify
 
 
     def initialize(yaml_str)
-      @lines = yaml_str.to_a()
+      @lines = yaml_str.lines
       @line  = nil
       @linenum = 0
       @anchors = {}
Index: kwalify/test/test-validator.rb
===================================================================
--- kwalify.orig/test/test-validator.rb
+++ kwalify/test/test-validator.rb
@@ -80,7 +80,7 @@ class ValidatorTest < Test::Unit::TestCa
   def _test_by_syck_parser(validator, input, expected)
     document = YAML.load(input)
     error_list  = validator.validate(document)
-    expected = expected.to_a.sort.join()
+    expected = expected.lines.sort.join()
     actual = error_list.collect { |e|
       "%-20s: [%s] %s\n" % [e.error_symbol.inspect, e.path, e.message]
     }.sort.join()