Commit a67f09c

mokha <mokha@cisco.com>
2018-03-21 01:39:47
remove duplicate frames.
1 parent 88a33fe
Changed files (1)
lib
lib/xsay/render.rb
@@ -23,7 +23,7 @@ module Xsay
 
     def each_frame
       frames = distance.downto(0).to_a + 0.upto(distance).to_a
-      frames.each { |x| yield x }
+      frames.uniq.each { |x| yield x }
     end
 
     private