From: Eric Wong <bofh@yhbt.net>
To: raindrops-public@yhbt.net
Subject: [PATCH] treewide: future-proof frozen_string_literal changes
Date: Thu, 8 Feb 2024 11:22:16 +0000 [thread overview]
Message-ID: <20240208112216.2650386-1-bofh@yhbt.net> (raw)
Once again Ruby seems ready to introduce more incompatibilities
and force busywork upon maintainers[1].
I definitely don't want to be dealing with this work in the
future, so I used the following sh + ed invocation to prepend
`frozen_string_literal: false' to every Ruby file to avoid
breaking anything until somebody else has the opportunity to go
through every single line of code.
for i in "$@"
do
ed $i <<-EOM
0i
# frozen_string_literal: false
.
w
q
EOM
done
[1] https://bugs.ruby-lang.org/issues/20205
---
examples/linux-listener-stats.rb | 1 +
examples/yahns.conf.rb | 1 +
examples/zbatery.conf.rb | 1 +
ext/raindrops/extconf.rb | 1 +
lib/raindrops.rb | 1 +
lib/raindrops/aggregate.rb | 1 +
lib/raindrops/aggregate/last_data_recv.rb | 1 +
lib/raindrops/aggregate/pmq.rb | 1 +
lib/raindrops/last_data_recv.rb | 1 +
lib/raindrops/linux.rb | 1 +
lib/raindrops/middleware.rb | 1 +
lib/raindrops/middleware/proxy.rb | 1 +
lib/raindrops/struct.rb | 1 +
lib/raindrops/watcher.rb | 1 +
setup.rb | 1 +
test/ipv6_enabled.rb | 1 +
test/rack_unicorn.rb | 1 +
test/test_aggregate_pmq.rb | 1 +
test/test_inet_diag_socket.rb | 1 +
test/test_last_data_recv.rb | 1 +
test/test_last_data_recv_unicorn.rb | 1 +
test/test_linux.rb | 1 +
test/test_linux_all_tcp_listen_stats.rb | 1 +
test/test_linux_all_tcp_listen_stats_leak.rb | 1 +
test/test_linux_ipv6.rb | 1 +
test/test_linux_middleware.rb | 1 +
test/test_linux_reuseport_tcp_listen_stats.rb | 1 +
test/test_middleware.rb | 1 +
test/test_middleware_unicorn.rb | 1 +
test/test_middleware_unicorn_ipv6.rb | 1 +
test/test_raindrops.rb | 1 +
test/test_raindrops_gc.rb | 1 +
test/test_struct.rb | 1 +
test/test_tcp_info.rb | 1 +
test/test_watcher.rb | 1 +
35 files changed, 35 insertions(+)
diff --git a/examples/linux-listener-stats.rb b/examples/linux-listener-stats.rb
index 7e767da..35908cf 100755
--- a/examples/linux-listener-stats.rb
+++ b/examples/linux-listener-stats.rb
@@ -1,0 +2 @@
+# frozen_string_literal: false
diff --git a/examples/yahns.conf.rb b/examples/yahns.conf.rb
index f5b4f10..75f0bd1 100644
--- a/examples/yahns.conf.rb
+++ b/examples/yahns.conf.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/examples/zbatery.conf.rb b/examples/zbatery.conf.rb
index 5f94c0e..0537466 100644
--- a/examples/zbatery.conf.rb
+++ b/examples/zbatery.conf.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/ext/raindrops/extconf.rb b/ext/raindrops/extconf.rb
index b8f147c..b1310b0 100644
--- a/ext/raindrops/extconf.rb
+++ b/ext/raindrops/extconf.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/lib/raindrops.rb b/lib/raindrops.rb
index dc61952..6cdbdd5 100644
--- a/lib/raindrops.rb
+++ b/lib/raindrops.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/lib/raindrops/aggregate.rb b/lib/raindrops/aggregate.rb
index 4fb731f..3c274c4 100644
--- a/lib/raindrops/aggregate.rb
+++ b/lib/raindrops/aggregate.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/lib/raindrops/aggregate/last_data_recv.rb b/lib/raindrops/aggregate/last_data_recv.rb
index 32908f2..6e0d60f 100644
--- a/lib/raindrops/aggregate/last_data_recv.rb
+++ b/lib/raindrops/aggregate/last_data_recv.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/lib/raindrops/aggregate/pmq.rb b/lib/raindrops/aggregate/pmq.rb
index 64d0a4f..b97e64a 100644
--- a/lib/raindrops/aggregate/pmq.rb
+++ b/lib/raindrops/aggregate/pmq.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/lib/raindrops/last_data_recv.rb b/lib/raindrops/last_data_recv.rb
index b4808a1..247e5ac 100644
--- a/lib/raindrops/last_data_recv.rb
+++ b/lib/raindrops/last_data_recv.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/lib/raindrops/linux.rb b/lib/raindrops/linux.rb
index 9842ae1..27e6251 100644
--- a/lib/raindrops/linux.rb
+++ b/lib/raindrops/linux.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/lib/raindrops/middleware.rb b/lib/raindrops/middleware.rb
index 20e573c..d68fbf2 100644
--- a/lib/raindrops/middleware.rb
+++ b/lib/raindrops/middleware.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/lib/raindrops/middleware/proxy.rb b/lib/raindrops/middleware/proxy.rb
index a7c8e66..35e0e56 100644
--- a/lib/raindrops/middleware/proxy.rb
+++ b/lib/raindrops/middleware/proxy.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/lib/raindrops/struct.rb b/lib/raindrops/struct.rb
index e81a78e..68a4d9c 100644
--- a/lib/raindrops/struct.rb
+++ b/lib/raindrops/struct.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/lib/raindrops/watcher.rb b/lib/raindrops/watcher.rb
index ac5b895..ded434e 100644
--- a/lib/raindrops/watcher.rb
+++ b/lib/raindrops/watcher.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/setup.rb b/setup.rb
index 5eb5006..510a1a8 100644
--- a/setup.rb
+++ b/setup.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/ipv6_enabled.rb b/test/ipv6_enabled.rb
index c4c9709..84ed9c1 100644
--- a/test/ipv6_enabled.rb
+++ b/test/ipv6_enabled.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/rack_unicorn.rb b/test/rack_unicorn.rb
index 0ecbd42..9ef7fb5 100644
--- a/test/rack_unicorn.rb
+++ b/test/rack_unicorn.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_aggregate_pmq.rb b/test/test_aggregate_pmq.rb
index 692b9bd..24e0277 100644
--- a/test/test_aggregate_pmq.rb
+++ b/test/test_aggregate_pmq.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_inet_diag_socket.rb b/test/test_inet_diag_socket.rb
index a8c9973..a236d93 100644
--- a/test/test_inet_diag_socket.rb
+++ b/test/test_inet_diag_socket.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_last_data_recv.rb b/test/test_last_data_recv.rb
index 9643dc6..edd00f3 100644
--- a/test/test_last_data_recv.rb
+++ b/test/test_last_data_recv.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_last_data_recv_unicorn.rb b/test/test_last_data_recv_unicorn.rb
index 60d1be9..d99c250 100644
--- a/test/test_last_data_recv_unicorn.rb
+++ b/test/test_last_data_recv_unicorn.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_linux.rb b/test/test_linux.rb
index 7808469..2fa6f5a 100644
--- a/test/test_linux.rb
+++ b/test/test_linux.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_linux_all_tcp_listen_stats.rb b/test/test_linux_all_tcp_listen_stats.rb
index ef1f943..05d6aa9 100644
--- a/test/test_linux_all_tcp_listen_stats.rb
+++ b/test/test_linux_all_tcp_listen_stats.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_linux_all_tcp_listen_stats_leak.rb b/test/test_linux_all_tcp_listen_stats_leak.rb
index 7be46d4..f7e2020 100644
--- a/test/test_linux_all_tcp_listen_stats_leak.rb
+++ b/test/test_linux_all_tcp_listen_stats_leak.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_linux_ipv6.rb b/test/test_linux_ipv6.rb
index 9e8730a..041cf33 100644
--- a/test/test_linux_ipv6.rb
+++ b/test/test_linux_ipv6.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_linux_middleware.rb b/test/test_linux_middleware.rb
index f573225..1b3cea3 100644
--- a/test/test_linux_middleware.rb
+++ b/test/test_linux_middleware.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_linux_reuseport_tcp_listen_stats.rb b/test/test_linux_reuseport_tcp_listen_stats.rb
index 4fda218..926bbb7 100644
--- a/test/test_linux_reuseport_tcp_listen_stats.rb
+++ b/test/test_linux_reuseport_tcp_listen_stats.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_middleware.rb b/test/test_middleware.rb
index 56ce346..e85c0f0 100644
--- a/test/test_middleware.rb
+++ b/test/test_middleware.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_middleware_unicorn.rb b/test/test_middleware_unicorn.rb
index 6730d4b..9ae94ad 100644
--- a/test/test_middleware_unicorn.rb
+++ b/test/test_middleware_unicorn.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_middleware_unicorn_ipv6.rb b/test/test_middleware_unicorn_ipv6.rb
index 3d6862c..11d9af8 100644
--- a/test/test_middleware_unicorn_ipv6.rb
+++ b/test/test_middleware_unicorn_ipv6.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_raindrops.rb b/test/test_raindrops.rb
index 6351c66..a82ab99 100644
--- a/test/test_raindrops.rb
+++ b/test/test_raindrops.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_raindrops_gc.rb b/test/test_raindrops_gc.rb
index 2098129..323185b 100644
--- a/test/test_raindrops_gc.rb
+++ b/test/test_raindrops_gc.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_struct.rb b/test/test_struct.rb
index 9792d5b..abf0c59 100644
--- a/test/test_struct.rb
+++ b/test/test_struct.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_tcp_info.rb b/test/test_tcp_info.rb
index 2ddacfd..8d24b94 100644
--- a/test/test_tcp_info.rb
+++ b/test/test_tcp_info.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
diff --git a/test/test_watcher.rb b/test/test_watcher.rb
index e5d1fa2..0fafb6d 100644
--- a/test/test_watcher.rb
+++ b/test/test_watcher.rb
@@ -0,0 +1 @@
+# frozen_string_literal: false
next reply other threads:[~2024-02-08 11:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 11:22 Eric Wong [this message]
2024-02-08 22:21 ` [PATCH v2] treewide: future-proof frozen_string_literal changes 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: http://yhbt.net/raindrops/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240208112216.2650386-1-bofh@yhbt.net \
--to=bofh@yhbt.net \
--cc=raindrops-public@yhbt.net \
/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
http://yhbt.net/raindrops.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).