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()
|