iniparse 1.4.3 → 1.4.4

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: ef588e81126741da025ef4c347f46c02b6a63037
4
- data.tar.gz: 3ecdabf11a24fc32e1241a6371e8e721cc49770a
3
+ metadata.gz: 68ca74b2d2a47beb58775462ebd3c928038ce47e
4
+ data.tar.gz: a135ace378ac6fc2d7ac02c0d5994fccbbb618cc
5
5
  SHA512:
6
- metadata.gz: 74eeab1bc5dbf530b3f8655794dcdc602efbe82e5950feae867d1d3a9e775ce9c82859ec53bb1d8ea0ac64d2a707b7d6691f1767874f36e4182fa07696744648
7
- data.tar.gz: 1158894ac7fe9d37a44a00b01b90325dbfec459e887cc343772af308407b015a482ff0c4e193dff53ee1d5caeef589d2cae6726e67001ed60c1dd9aeb4977454
6
+ metadata.gz: 4bc926b7837a569f77b57a8149185fce5d30e70b0bb135c71d86ff2a5732d6a3a72ef875719d6d1664083f85c1eb7a5f28b4bb6ddf153d394883ecada093af76
7
+ data.tar.gz: c5755e73204068b68df3f72ee72de32ec852972aaa531818b8e23075d0ee87a860c96bbf5711eb9e4dfe05009bc3c29ec760098a58a62b0c0cef66e4e1ed6eb6
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
12
12
  ## If your rubyforge_project name is different, then edit it and comment out
13
13
  ## the sub! line in the Rakefile
14
14
  s.name = 'iniparse'
15
- s.version = '1.4.3'
16
- s.date = '2017-06-01'
15
+ s.version = '1.4.4'
16
+ s.date = '2017-07-04'
17
17
  s.rubyforge_project = 'iniparse'
18
18
 
19
19
  s.summary = 'A pure Ruby library for parsing INI documents.'
@@ -7,7 +7,7 @@ require File.join(dir, 'lines')
7
7
  require File.join(dir, 'parser')
8
8
 
9
9
  module IniParse
10
- VERSION = '1.4.3'
10
+ VERSION = '1.4.4'
11
11
 
12
12
  # A base class for IniParse errors.
13
13
  class IniParseError < StandardError; end
@@ -29,7 +29,7 @@ module IniParse
29
29
  # source<String>:: The source string.
30
30
  #
31
31
  def initialize(source)
32
- @source = source.dup.sub(/\n\z/,'')
32
+ @source = source.dup
33
33
  end
34
34
 
35
35
  # Parses the source string and returns the resulting data structure.
@@ -64,7 +64,7 @@ module IniParse
64
64
  if parsed.nil?
65
65
  raise IniParse::ParseError,
66
66
  "A line of your INI document could not be parsed to a " \
67
- "LineType: '#{line}'."
67
+ "LineType: #{line.inspect}."
68
68
  end
69
69
 
70
70
  parsed
@@ -88,6 +88,8 @@ module IniParse
88
88
  line[(m[1].length..-1)].index(m[2]) + m[1].length
89
89
 
90
90
  line = m[1]
91
+ else
92
+ line = line.chomp
91
93
  end
92
94
 
93
95
  [line, opts]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iniparse
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-01 00:00:00.000000000 Z
11
+ date: 2017-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec