We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8a4fb60 + a20b6dc commit 27afd41Copy full SHA for 27afd41
.gitignore
@@ -1,3 +1,5 @@
1
*.swp
2
/doc
3
/.yardoc
4
+Gemfile.lock
5
+
.rubocop.yml
@@ -27,3 +27,6 @@ Style/TrailingCommaInArrayLiteral:
27
Enabled: false
28
Style/TrailingCommaInHashLiteral:
29
30
31
+Gemspec/DevelopmentDependencies:
32
+ Enabled: false
lib/maxmind/db.rb
@@ -273,7 +273,7 @@ def resolve_data_pointer(pointer)
273
end
274
275
def find_metadata_start
276
- metadata_max_size = @size < METADATA_MAX_SIZE ? @size : METADATA_MAX_SIZE
+ metadata_max_size = [@size, METADATA_MAX_SIZE].min
277
278
stop_index = @size - metadata_max_size
279
index = @size - METADATA_START_MARKER_LENGTH
0 commit comments