]> git.cworth.org Git - sup/blobdiff - lib/sup/util.rb
Merge commit 'origin/utf8-fixes'
[sup] / lib / sup / util.rb
index 02575c0fdd0403e727f829692c7c1d9ffadbcde4..b479908e1263dc1384537c72c2d0c9fcaf4c9146 100644 (file)
@@ -405,6 +405,10 @@ class Array
 
   def last= e; self[-1] = e end
   def nonempty?; !empty? end
+
+  def to_set_of_symbols
+    map { |x| x.is_a?(Symbol) ? x : x.intern }.uniq
+  end
 end
 
 class Time