diff options
Diffstat (limited to 'benchmark/bm_so_lists.rb')
| -rw-r--r-- | benchmark/bm_so_lists.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmark/bm_so_lists.rb b/benchmark/bm_so_lists.rb index e8f4a2a5f..512e312cc 100644 --- a/benchmark/bm_so_lists.rb +++ b/benchmark/bm_so_lists.rb @@ -17,19 +17,19 @@ def test_lists() # li2 must now be empty # remove each individual item from right side of li3 and # append to right side of li2 (reversing list) - while (not li3.empty?) + until li3.empty? li2.push(li3.pop) end # li3 must now be empty # reverse li1 in place li1.reverse! # check that first item is now SIZE - if li1[0] != SIZE then + if li1[0] != SIZE p "not SIZE" 0 else # compare li1 and li2 for equality - if li1 != li2 then + if li1 != li2 return(0) else # return the length of the list |
