everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: dtas-all@nongnu.org
Subject: [PATCH 2/3] dtas-console: pass kwargs as-is to String#encode
Date: Thu, 31 Oct 2019 10:00:53 +0000	[thread overview]
Message-ID: <20191031100054.13415-3-e@80x24.org> (raw)
In-Reply-To: <20191031100054.13415-1-e@80x24.org>

Ruby 2.7.0dev will warn when hashes are passed and intended
for use as kwargs unless we expand the hash via "**enc_opts",
but "**" is Ruby 2.0+ syntax and I guess we still support
1.9.3 for the time being.
 bin/dtas-console | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/dtas-console b/bin/dtas-console
index 877c9c4..2143e65 100755
--- a/bin/dtas-console
+++ b/bin/dtas-console
@@ -119,7 +119,6 @@ def may_fail(res, events)
 pre_mute_vol = 1.0
 enc_locale = Encoding.find("locale")
-enc_opts = { undef: :replace, invalid: :replace, replace: '?' }
@@ -165,7 +164,8 @@ def may_fail(res, events)
       # FS encoding != locale encoding, but we need to display an FS path
       # name to whatever locale the terminal is encoded to, so force it
       # and risk mojibake...
-      infile.encode(enc_locale, enc_opts)
+      infile.encode(enc_locale,
+                    undef: :replace, invalid: :replace, replace: '?')
       Curses.setpos(lineno += 1, 0)

  parent reply	other threads:[~2019-10-31 10:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31 10:00 [PATCH 0/3] fixup annoying Ruby 2.7.0dev warnings Eric Wong
2019-10-31 10:00 ` [PATCH 1/3] dtas-console: remove unused variables Eric Wong
2019-10-31 10:00 ` Eric Wong [this message]
2019-10-31 10:00 ` [PATCH 3/3] buffer/splice: pass kwargs as-is to tee/splice 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:

  List information: https://80x24.org/dtas/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191031100054.13415-3-e@80x24.org \
    --to=e@80x24.org \
    --cc=dtas-all@nongnu.org \


* 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


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).