From e98cb24a1df4f0b25adab16db925d5790ba9d49c Mon Sep 17 00:00:00 2001 From: Nat Lasseter Date: Wed, 20 Oct 2021 20:43:34 +0100 Subject: Updates for ruby 2.7.0/3.0.0, Proc.new deprecated --- lib/hosts.rb | 4 ++-- lib/sshconfig.rb | 4 ++-- sshconfig.gemspec | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/hosts.rb b/lib/hosts.rb index 1a0fc27..1917b93 100644 --- a/lib/hosts.rb +++ b/lib/hosts.rb @@ -11,8 +11,8 @@ module SSHConfig @hosts += morehosts.hosts end - def host(name) - @hosts << Host.new(name, &Proc.new) + def host(name, &blk) + @hosts << Host.new(name, &blk) end def to_s diff --git a/lib/sshconfig.rb b/lib/sshconfig.rb index 204a127..81ac116 100644 --- a/lib/sshconfig.rb +++ b/lib/sshconfig.rb @@ -7,7 +7,7 @@ module SSHConfig $hostlist = Hosts.new{} - def hosts - $hostlist.merge(Hosts.new(&Proc.new)) + def hosts(&blk) + $hostlist.merge(Hosts.new(&blk)) end end diff --git a/sshconfig.gemspec b/sshconfig.gemspec index fa2499e..09bc1c2 100644 --- a/sshconfig.gemspec +++ b/sshconfig.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'sshconfig' - s.version = '13' - s.date = '2017-01-11' + s.version = '14' + s.date = '2021-10-20' s.summary = "SSH Config DSL" s.description = "A DSL to generate SSH config" s.authors = ["Nathan Lasseter"] -- cgit v1.2.1