From: Eric Wong <e@80x24.org>
To: mogilefs-client-public@bogomips.org
Subject: [PATCH 1/3] mogilefs: actually use kwarg for Net::HTTP::Persistent.new
Date: Wed, 30 Oct 2019 09:23:55 +0000 [thread overview]
Message-ID: <20191030092357.30238-2-e@80x24.org> (raw)
In-Reply-To: <20191030092357.30238-1-e@80x24.org>
Ruby 2.7.0dev will warn about hashes uses as kwargs *sigh*
---
lib/mogilefs/mogilefs.rb | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/mogilefs/mogilefs.rb b/lib/mogilefs/mogilefs.rb
index 724dfb6..990ae38 100644
--- a/lib/mogilefs/mogilefs.rb
+++ b/lib/mogilefs/mogilefs.rb
@@ -550,8 +550,11 @@ def file_debug(args)
end
def nhp_new(name) # :nodoc:
- Net::HTTP::Persistent::VERSION.to_f >= 3.0 and name = { :name => name }
- MogileFS::NHP.new(name)
+ if Net::HTTP::Persistent::VERSION.to_f >= 3.0
+ MogileFS::NHP.new(:name => name)
+ else
+ MogileFS::NHP.new(name)
+ end
rescue NameError
MogileFS::NHP.new(name)
end
next prev parent reply other threads:[~2019-10-30 9:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 9:23 [PATCH 0/3] updates for newer Rubies Eric Wong
2019-10-30 9:23 ` Eric Wong [this message]
2019-10-30 9:23 ` [PATCH 2/3] fix more indentation warnings Eric Wong
2019-10-30 9:23 ` [PATCH 3/3] test_client: quiet warnings about redefining accessors Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/mogilefs-client/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191030092357.30238-2-e@80x24.org \
--to=e@80x24.org \
--cc=mogilefs-client-public@bogomips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/mogilefs-client.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).