about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-04-13 00:54:23 +0000
committerEric Wong <e@80x24.org>2015-04-13 00:54:23 +0000
commitb1b8e7f08342c8864501338b92cc6d1dce9173b2 (patch)
treeffebfd54bf6214222b0da439e46c9648ab015aeb
parentedc1366357b626703bcbc64c43e3d76507efc817 (diff)
downloaddtas-b1b8e7f08342c8864501338b92cc6d1dce9173b2.tar.gz
This allows us to avoid unnecessary Array conversions in
call sites
-rw-r--r--lib/dtas/xs.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dtas/xs.rb b/lib/dtas/xs.rb
index 04ac252..7b3a0c2 100644
--- a/lib/dtas/xs.rb
+++ b/lib/dtas/xs.rb
@@ -9,6 +9,6 @@ require 'shellwords'
 # again, filesystems can use any byte value in names except '\0'.
 module DTAS::XS # :nodoc:
   def xs(ary)
-    Shellwords.join(ary.map(&:b))
+    Shellwords.join(Array(ary).map(&:b))
   end
 end