psych 2.0.10 → 2.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e5c90da9dd1e414da2fd88c99a8a54ddec4c086
4
- data.tar.gz: ffcc4e20b755b2e0beb3747d3606daa8f4cb6819
3
+ metadata.gz: 2af495236ef2b2ab2ac26fdff1cd7fb85582213f
4
+ data.tar.gz: 06fc3358b7e7a6cfc4190e6ade00b5519cd42611
5
5
  SHA512:
6
- metadata.gz: dfe83058664c3da10a4a42a64967beca000f69ae3fde2857faa997464bfd518221ec864d196b88777f8d20293f6bd8bf814f236bb237f99369562bcd334065e9
7
- data.tar.gz: 81d19e5195c344ef08dca2aab53d9d13b46327fb937756b6c09211856ab14c1a948a197676b3651fa40a3df3d783292e2488d6632ca959fbd49069f2bf37c366
6
+ metadata.gz: 10395b46073a828ffae197ac8c07375f5254f15ddfe3968f3ccb371002b7711e1df26a75cb0aedf88f5f26544b6aaca6d7e72cc0a52ced6f76f768dbd4e024f1
7
+ data.tar.gz: 021960c8a5f0d0690312c6c9b07903a849e97be93bcfc013d449b75a010d8b633de5cbcb9a3f1b68fb07056f93daaf23bb9431f473310e4ed74c6516225b0858
@@ -217,7 +217,7 @@ require 'psych/class_loader'
217
217
 
218
218
  module Psych
219
219
  # The version is Psych you're using
220
- VERSION = '2.0.10'
220
+ VERSION = '2.0.11'
221
221
 
222
222
  # The version of libyaml Psych is using
223
223
  LIBYAML_VERSION = Psych.libyaml_version.join '.'
@@ -310,7 +310,7 @@ module Psych
310
310
  style = Nodes::Scalar::LITERAL
311
311
  plain = false
312
312
  quote = false
313
- elsif o =~ /\n[^\Z]/ # match \n except blank line at the end of string
313
+ elsif o =~ /\n(?!\Z)/ # match \n except blank line at the end of string
314
314
  style = Nodes::Scalar::LITERAL
315
315
  elsif o == '<<'
316
316
  style = Nodes::Scalar::SINGLE_QUOTED
@@ -66,18 +66,26 @@ module Psych
66
66
  end
67
67
 
68
68
  def test_literal_when_inner_and_final_line_break
69
- str = "Lorem ipsum\ndolor\n"
70
- yaml = Psych.dump str, line_width: 12
71
- assert_match /---\s*|\n(.*\n){2}\Z/, yaml
72
- assert_equal str, Psych.load(yaml)
69
+ [
70
+ "Lorem ipsum\ndolor\n",
71
+ "Lorem ipsum\nZolor\n",
72
+ ].each do |str|
73
+ yaml = Psych.dump str, line_width: 12
74
+ assert_match /---\s*\|\n(.*\n){2}\Z/, yaml
75
+ assert_equal str, Psych.load(yaml)
76
+ end
73
77
  end
74
78
 
75
79
  # http://yaml.org/spec/1.2/2009-07-21/spec.html#id2593651
76
80
  def test_literal_strip_when_inner_line_break_and_no_final_line_break
77
- str = "Lorem ipsum\ndolor"
78
- yaml = Psych.dump str, line_width: 12
79
- assert_match /---\s*|-\n(.*\n){2}\Z/, yaml
80
- assert_equal str, Psych.load(yaml)
81
+ [
82
+ "Lorem ipsum\ndolor",
83
+ "Lorem ipsum\nZolor",
84
+ ].each do |str|
85
+ yaml = Psych.dump str, line_width: 12
86
+ assert_match /---\s*\|-\n(.*\n){2}\Z/, yaml
87
+ assert_equal str, Psych.load(yaml)
88
+ end
81
89
  end
82
90
 
83
91
  def test_cycle_x
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: psych
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-16 00:00:00.000000000 Z
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc