File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ def parse_args
2929
3030def print_usage
3131 # rubocop:disable Style/StderrPuts
32- STDERR . puts "Usage: #{ $PROGRAM_NAME} <MMDB file> <IP file>"
33- STDERR . puts
34- STDERR . puts 'Benchmark by reading IPs from the IP file and looking up each one in the MMDB file.'
32+ $stderr . puts "Usage: #{ $PROGRAM_NAME} <MMDB file> <IP file>"
33+ $stderr . puts
34+ $stderr . puts 'Benchmark by reading IPs from the IP file and looking up each one in the MMDB file.'
3535 # rubocop:enable Style/StderrPuts
3636end
3737
Original file line number Diff line number Diff line change @@ -14,8 +14,7 @@ def test_reader
1414 modes . each do |mode |
1515 [ 24 , 28 , 32 ] . each do |record_size |
1616 [ 4 , 6 ] . each do |ip_version |
17- filename = 'test/data/test-data/MaxMind-DB-test-ipv' +
18- ip_version . to_s + '-' + record_size . to_s + '.mmdb'
17+ filename = "test/data/test-data/MaxMind-DB-test-ipv#{ ip_version } -#{ record_size } .mmdb"
1918 reader = MaxMind ::DB . new ( filename , mode : mode )
2019 check_metadata ( reader , ip_version , record_size )
2120 if ip_version == 4
@@ -134,7 +133,7 @@ def test_get_with_prefix_len
134133 } ]
135134
136135 tests . each do |test |
137- reader = MaxMind ::DB . new ( ' test/data/test-data/' + test [ 'file_name' ] )
136+ reader = MaxMind ::DB . new ( " test/data/test-data/#{ test [ 'file_name' ] } " )
138137 record , prefix_length = reader . get_with_prefix_length ( test [ 'ip' ] )
139138
140139 assert_equal ( test [ 'expected_prefix_length' ] , prefix_length ,
You can’t perform that action at this time.
0 commit comments