summaryrefslogtreecommitdiff
path: root/t/test-custodian-parser.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 13:08:33 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 13:08:33 +0000
commit3a96cc957dbd97c6ffeaea42f738e7c35b4acbc7 (patch)
tree1a709ddc989f52f065b681e0ee80265c31647ca4 /t/test-custodian-parser.rb
parentd0f94ecdf76f1a3ff9e2d0e5c0f654c2089561cd (diff)
Avoid "Array.new" and "Hash.new"
Instead use {} + ().
Diffstat (limited to 't/test-custodian-parser.rb')
-rwxr-xr-xt/test-custodian-parser.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/test-custodian-parser.rb b/t/test-custodian-parser.rb
index bd6a933..5822ecd 100755
--- a/t/test-custodian-parser.rb
+++ b/t/test-custodian-parser.rb
@@ -93,12 +93,12 @@ class TestCustodianParser < Test::Unit::TestCase
#
parser = Custodian::Parser.new()
# 2.a. Comment lines return nil.
- tmp = Array.new()
+ tmp = []
tmp.push( "# This is a comment.." )
assert( parser.parse_lines( tmp ).nil? )
# 2.b. Adding a test will return an array of test-objects.
- tmp = Array.new()
+ tmp = []
tmp.push( "smtp.bytemark.co.uk must run ssh on 22 otherwise 'oops'." );
ret = parser.parse_lines( tmp )
assert( ret.kind_of? Array );
@@ -171,7 +171,7 @@ EOF
#
# Input text
#
- text = Array.new()
+ text = []
text.push( "FOO is kvm1.vm.bytemark.co.uk." );
text.push( "FOO2 is kvm2.vm.bytemark.co.uk." );
@@ -202,7 +202,7 @@ EOF
#
# Input text to parse.
#
- text = Array.new()
+ text = []
text.push( "FOO is kvm1.vm.bytemark.co.uk." );
text.push( "FOO is kvm2.vm.bytemark.co.uk." );