Skip to content

Commit 054a04f

Browse files
committed
Use StringIO#truncate
1 parent 3e10c61 commit 054a04f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

example/animation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def out.tty?; true; end
1212
Signal.trap(:INT) { continue = false }
1313

1414
while continue
15-
out.string = ""
15+
out.truncate(0)
1616

1717
xs = 0...N
1818
ys = xs.map {|x| Math.sin(2*Math::PI*(x + shift) / N) }

0 commit comments

Comments
 (0)