Sha256: 8347fb4d77b20b30b89f63fd6816954f8ed8015a26159d9194b2e55508403f7f
Contents?: true
Size: 1.98 KB
Versions: 3
Compression:
Stored size: 1.98 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>test_delete_at (Tectcase)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/facet/array/delete_values_at.rb, line 46</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_delete_at</span> <span class="ruby-identifier">a</span> = [<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>,<span class="ruby-value">4</span>] <span class="ruby-identifier">assert_equal</span>( [<span class="ruby-value">2</span>,<span class="ruby-value">3</span>], <span class="ruby-identifier">a</span>.<span class="ruby-identifier">delete_values_at</span>(<span class="ruby-value">1</span>,<span class="ruby-value">2</span>) ) <span class="ruby-identifier">assert_equal</span>( [<span class="ruby-value">1</span>,<span class="ruby-value">4</span>], <span class="ruby-identifier">a</span> ) <span class="ruby-identifier">a</span> = [<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>,<span class="ruby-value">4</span>] <span class="ruby-identifier">assert_equal</span>( [<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>], <span class="ruby-identifier">a</span>.<span class="ruby-identifier">delete_values_at</span>(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">2</span>) ) <span class="ruby-identifier">assert_equal</span>( [<span class="ruby-value">4</span>], <span class="ruby-identifier">a</span> ) <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
3 entries across 3 versions & 1 rubygems