aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/bm_app_pentomino.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-05 13:52:16 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-05 13:52:16 +0000
commitd22d3b5a7a37bc2ff723fa5acc4ce2d85539d189 (patch)
tree440e1f4cbf395fe32da95538b2ef5d6b8df14be3 /benchmark/bm_app_pentomino.rb
parentc5a0c3be2e604e64ffa9cb77d758ac10eedecce9 (diff)
downloadruby-d22d3b5a7a37bc2ff723fa5acc4ce2d85539d189.tar.gz
* benchmark/bm_app_pentomino.rb : use Array#dup instead of
Array#clone * benchmark/bmx_temp.rb : removed * benchmark/run.rb : use run.rb instead of run_rite.rb * common.mk : ditto * benchmark/run_rite.rb : removed * common.mk : use $(srcdir)/test.rb to run a test program with "make run" * benchmark/bmx_temp.rb : removed and set svn:ignore (bmx_*.rb) to benchmark/ * test.rb : set svn:ignore git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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