From 0c05fd8014dd953b36836d90255a97351193fdf7 Mon Sep 17 00:00:00 2001 From: Simone Carletti Date: Thu, 14 Dec 2023 09:26:43 +0100 Subject: [PATCH] Bump Rubocop to Ruby 2.6 --- .rubocop.yml | 2 +- lib/whois/server.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index f628703f1..cfc17390b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,7 +6,7 @@ require: - rubocop-rspec AllCops: - TargetRubyVersion: 2.5 + TargetRubyVersion: 2.6 Exclude: # Exclude .gemspec files because they are generally auto-generated - '*.gemspec' diff --git a/lib/whois/server.rb b/lib/whois/server.rb index 5696ca53a..516bc7952 100644 --- a/lib/whois/server.rb +++ b/lib/whois/server.rb @@ -86,7 +86,7 @@ def load_json(file) options = if settings.empty? EMPTY_HASH else - settings.map { |k, v| [k.to_sym, v.is_a?(String) ? intern_string(v) : v] }.to_h.freeze + settings.to_h { |k, v| [k.to_sym, v.is_a?(String) ? intern_string(v) : v] }.freeze end define(type, allocation, host, options) end @@ -303,7 +303,7 @@ def find_for_domain(string) index = token.index(".") break if index.nil? - token = token[(index + 1)..-1] + token = token[(index + 1)..] end end