Skip to content

Commit 775fcf4

Browse files
committed
Fix more lints
1 parent 3297bc4 commit 775fcf4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

bin/mmdb-benchmark.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def parse_args
2929

3030
def 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
3636
end
3737

test/test_reader.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)