o-inifile 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/inifile.rb +1 -1
  3. data/test/test_inifile.rb +41 -23
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f60e4b8e5246f6327f832017a37ad425a603cdc0214fe882a7cab21b6345197e
4
- data.tar.gz: ca427a71f5c017bd951a086a46e83f1ab909a3e2b8f52c2254485120b861a345
3
+ metadata.gz: ef7874e10db7cfbb64fa3ff47802b8f2175661246f8fd1c7811b90f4b4325eba
4
+ data.tar.gz: 948ec19f58ed9f2a0b23ab15fae267b985469031df01e78b0f2b0800f9d45cd5
5
5
  SHA512:
6
- metadata.gz: fc1a611372e22d90d4dbcdac29d93d65bc2e7b6d4a3437eac0490e2a9d086eb1619906671db2fa2af05446cdb564659ed28522f2d81bf7b0a5f5a4ced87caf07
7
- data.tar.gz: 7cbd4400167dbbfbb1eb4a118d9d29b40299cd03d78ad352f36c6b85f31e331e55891c48a97ac87afb3c9528270e6c9c5bbab8f66365a6c6cdde18fa2a8a81ee
6
+ metadata.gz: 39b23872dbac016abb099348923233059f1694144284cbf7506b4e4f12ff9811659c01d2714199b7f557b0e3f73aa2ba5be1a07fa8f51165aa3220507fabc644
7
+ data.tar.gz: 50929d56f9f2e69dac764eb466542ecaa3dab18193be4a18a4178650fecd43381a3df9aa32641bf49a89520e493beeedafa763897d736e90ea574928f1382875
data/lib/inifile.rb CHANGED
@@ -5,7 +5,7 @@
5
5
  class IniFile
6
6
  include Enumerable
7
7
 
8
- VERSION = '4.0.0'
8
+ VERSION = '4.0.1'
9
9
 
10
10
  class Error < StandardError; end
11
11
 
data/test/test_inifile.rb CHANGED
@@ -62,26 +62,34 @@ class TestIniFile < Test::Unit::TestCase
62
62
  def test_clone
63
63
  clone = @ini_file.clone
64
64
  assert_equal @ini_file, clone
65
- assert !clone.tainted?
65
+ if RUBY_VERSION < '2.7'
66
+ assert !clone.tainted?
67
+ end
66
68
  assert !clone.frozen?
67
69
 
68
70
  # the clone should be completely independent of the original
69
71
  clone['new_section']['one'] = 1
70
72
  assert_not_equal @ini_file, clone
71
73
 
72
- # the tainted state is copied to clones
73
- @ini_file.taint
74
- assert @ini_file.tainted?
74
+ if RUBY_VERSION < '2.7'
75
+ # the tainted state is copied to clones
76
+ @ini_file.taint
77
+ assert @ini_file.tainted?
78
+ end
75
79
 
76
- clone = @ini_file.clone
77
- assert clone.tainted?
80
+ if RUBY_VERSION < '2.7'
81
+ clone = @ini_file.clone
82
+ assert clone.tainted?
83
+ end
78
84
 
79
85
  # the frozen state is also copied to clones
80
86
  @ini_file.freeze
81
87
  assert @ini_file.frozen?
82
88
 
83
89
  clone = @ini_file.clone
84
- assert clone.tainted?
90
+ if RUBY_VERSION < '2.7'
91
+ assert clone.tainted?
92
+ end
85
93
  assert clone.frozen?
86
94
  end
87
95
 
@@ -98,26 +106,34 @@ class TestIniFile < Test::Unit::TestCase
98
106
  def test_dup
99
107
  dup = @ini_file.dup
100
108
  assert_equal @ini_file, dup
101
- assert !dup.tainted?
109
+ if RUBY_VERSION < '2.7'
110
+ assert !dup.tainted?
111
+ end
102
112
  assert !dup.frozen?
103
113
 
104
114
  # the duplicate should be completely independent of the original
105
115
  dup['new_section']['one'] = 1
106
116
  assert_not_equal @ini_file, dup
107
117
 
108
- # the tainted state is copied to duplicates
109
- @ini_file.taint
110
- assert @ini_file.tainted?
118
+ if RUBY_VERSION < '2.7'
119
+ # the tainted state is copied to duplicates
120
+ @ini_file.taint
121
+ assert @ini_file.tainted?
122
+ end
111
123
 
112
- dup = @ini_file.dup
113
- assert dup.tainted?
124
+ if RUBY_VERSION < '2.7'
125
+ dup = @ini_file.dup
126
+ assert dup.tainted?
127
+ end
114
128
 
115
129
  # the frozen state, however, is not
116
130
  @ini_file.freeze
117
131
  assert @ini_file.frozen?
118
132
 
119
133
  dup = @ini_file.dup
120
- assert dup.tainted?
134
+ if RUBY_VERSION < '2.7'
135
+ assert dup.tainted?
136
+ end
121
137
  assert !dup.frozen?
122
138
  end
123
139
 
@@ -332,17 +348,19 @@ class TestIniFile < Test::Unit::TestCase
332
348
  assert_equal [], ini_file.sections
333
349
  end
334
350
 
335
- def test_taint
336
- assert_equal false, @ini_file.tainted?
337
- @ini_file.each_section do |s|
338
- assert_equal false, @ini_file[s].tainted?
339
- end
351
+ if RUBY_VERSION < '2.7'
352
+ def test_taint
353
+ assert_equal false, @ini_file.tainted?
354
+ @ini_file.each_section do |s|
355
+ assert_equal false, @ini_file[s].tainted?
356
+ end
340
357
 
341
- @ini_file.taint
358
+ @ini_file.taint
342
359
 
343
- assert_equal true, @ini_file.tainted?
344
- @ini_file.each_section do |s|
345
- assert_equal true, @ini_file[s].tainted?
360
+ assert_equal true, @ini_file.tainted?
361
+ @ini_file.each_section do |s|
362
+ assert_equal true, @ini_file[s].tainted?
363
+ end
346
364
  end
347
365
  end
348
366
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: o-inifile
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Pudeyev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-07 00:00:00.000000000 Z
12
+ date: 2021-09-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bones