From f498d7d5c77b1726c663f0cf337a21e1e9a28c49 Mon Sep 17 00:00:00 2001 From: Ian Trudel Date: Mon, 20 Feb 2017 19:10:16 -0500 Subject: [PATCH] Improving curve_to expert sample No need to use each_with_index on @controllers either. --- samples/expert-curve-control-points.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/expert-curve-control-points.rb b/samples/expert-curve-control-points.rb index 8aaeadfb..eff2d324 100644 --- a/samples/expert-curve-control-points.rb +++ b/samples/expert-curve-control-points.rb @@ -19,7 +19,7 @@ xy.each { |n| (@controllers ||= []) << oval(:left => n[0], :top => n[1], :radius => 10, :center => true) } - @controllers.each_with_index { |n, index| + @controllers.each { |n| n.click do |btn, left, top| n.style :fill => red @controller = n