ref/ruby/classes/Integer.src/M000020.html in ruby-vpi-8.1.0 vs ref/ruby/classes/Integer.src/M000020.html in ruby-vpi-8.2.0

- old
+ new

@@ -3,23 +3,20 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>pack (Integer)</title> + <title>ensure_max (Integer)</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <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/ruby-vpi/integer.rb, line 89</span> -89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pack</span> <span class="ruby-identifier">aPackedWidth</span> -90: <span class="ruby-identifier">bits</span> = <span class="ruby-identifier">length</span> -91: <span class="ruby-identifier">bits</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span> <span class="ruby-comment cmt"># positive integers also have a sign bit (zero)</span> -92: -93: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">aPackedWidth</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-identifier">bits</span> -94: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;packed width #{aPackedWidth} must be at least #{bits} for integer #{self}&quot;</span> -95: <span class="ruby-keyword kw">end</span> -96: -97: <span class="ruby-identifier">extend_sign</span>(<span class="ruby-identifier">bits</span>, <span class="ruby-identifier">aPackedWidth</span>) -98: <span class="ruby-keyword kw">end</span></pre> + <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/integer.rb, line 79</span> +79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ensure_max</span> <span class="ruby-identifier">aLimit</span> +80: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">aLimit</span> +81: <span class="ruby-identifier">aLimit</span> +82: <span class="ruby-keyword kw">else</span> +83: <span class="ruby-keyword kw">self</span> +84: <span class="ruby-keyword kw">end</span> +85: <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file