summaryrefslogtreecommitdiff
path: root/benchmark/bm_app_pentomino.rb
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/bm_app_pentomino.rb')
-rw-r--r--benchmark/bm_app_pentomino.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/benchmark/bm_app_pentomino.rb b/benchmark/bm_app_pentomino.rb
index 0fc80fade9..4aa144542a 100644
--- a/benchmark/bm_app_pentomino.rb
+++ b/benchmark/bm_app_pentomino.rb
@@ -18,7 +18,7 @@ def piece(n, a, nb)
if n == NP-1
$p << [a.sort]
else
- nbc=nb.clone
+ nbc=nb.dup
[-ROW, -1, 1, ROW].each{|d|
if x+d > 0 and not a.include?(x+d) and not nbc.include?(x+d)
nbc << x+d
@@ -113,7 +113,7 @@ def setpiece(a,pos)
$b[pos+s] = i
}
a << i
- setpiece(a.clone, pos)
+ setpiece(a.dup, pos)
a.pop
x.each{|s|
$b[pos+s] = -1
@@ -148,7 +148,7 @@ def piece(n,a,nb)
if n == NP-1
$p << [a.sort]
else
- nbc=nb.clone
+ nbc=nb.dup
for d in [-ROW, -1, 1, ROW]
if x+d > 0 and not a.include?(x+d) and not nbc.include?(x+d)
nbc << x+d
@@ -242,7 +242,7 @@ def setpiece(a,pos)
$b[pos+s] = i
end
a << i
- setpiece(a.clone, pos)
+ setpiece(a.dup, pos)
a.pop
for s in x do
$b[pos+s] = -1