diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:08:33 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:08:33 +0000 |
commit | 22b40326730fb7a4a8e2f5cb8d877f6a84494d02 (patch) | |
tree | c08f5ade5267c79cf3929bccc75dd4b704717500 /t/test-custodian-parser.rb | |
parent | 5cc24f3a9a25a4214f1ee85a24960cce9f4f9516 (diff) |
Avoid "Array.new" and "Hash.new"
Instead use {} + ().
Diffstat (limited to 't/test-custodian-parser.rb')
-rwxr-xr-x | t/test-custodian-parser.rb | 8 |
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." ); |