about summary refs log tree commit homepage
path: root/bin/posix-mq-rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-02-02 20:11:22 +0000
committerEric Wong <e@80x24.org>2016-02-02 20:11:22 +0000
commit879bccec2058505f3d5c446595083649169b357c (patch)
treeb498365b6a583b98d999032c164a588dd20f883d /bin/posix-mq-rb
parenta95c89375c43557ebed870b04f499ea66a06b1f2 (diff)
downloadruby_posix_mq-879bccec2058505f3d5c446595083649169b357c.tar.gz
No changes for older Rubies, but this reduces garbage under 2.3
Diffstat (limited to 'bin/posix-mq-rb')
-rwxr-xr-xbin/posix-mq-rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/posix-mq-rb b/bin/posix-mq-rb
index 8c77aea..45efb7b 100755
--- a/bin/posix-mq-rb
+++ b/bin/posix-mq-rb
@@ -1,5 +1,6 @@
 #!/usr/bin/env ruby
 # -*- encoding: binary -*-
+# -*- frozen_string_literal: true -*-
 $stderr.sync = $stdout.sync = true
 $stdout.binmode
 $stderr.binmode
@@ -100,7 +101,7 @@ begin
   when :create
     exit
   when :receive
-    buf, prio = mq.receive("", timeout)
+    buf, prio = mq.receive(nil, timeout)
     $stderr.write("priority=#{prio}\n") if priority
     $stdout.write(buf)
   when :send