ref/ruby/classes/String.src/M000025.html in ruby-vpi-17.0.0 vs ref/ruby/classes/String.src/M000025.html in ruby-vpi-18.0.0
- old
+ new
@@ -3,39 +3,16 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>verilog_to_ruby (String)</title>
+ <title>rstrip_from (String)</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/verilog_parser.rb, line 70</span>
-70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">verilog_to_ruby</span>
-71: <span class="ruby-identifier">content</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
-72:
-73: <span class="ruby-comment cmt"># single-line comments</span>
-74: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{//(.*)$}</span>, <span class="ruby-value str">'#\1'</span>
-75:
-76: <span class="ruby-comment cmt"># multi-line comments</span>
-77: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{/\*.*?\*/}</span><span class="ruby-identifier">m</span>, <span class="ruby-value str">"\n=begin\n\\0\n=end\n"</span>
-78:
-79: <span class="ruby-comment cmt"># preprocessor directives</span>
-80: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{`include}</span>, <span class="ruby-value str">'#\0'</span>
-81:
-82: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{`define\s+(\w+)\s+(.+)}</span> <span class="ruby-keyword kw">do</span>
-83: <span class="ruby-node">"#{$1.to_ruby_const_name} = #{$2}"</span>
-84: <span class="ruby-keyword kw">end</span>
-85:
-86: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{`+}</span>, <span class="ruby-value str">''</span>
-87:
-88: <span class="ruby-comment cmt"># numbers</span>
-89: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{\d*\'([dohb]\w+)}</span>, <span class="ruby-value str">'0\1'</span>
-90:
-91: <span class="ruby-comment cmt"># ranges</span>
-92: <span class="ruby-identifier">content</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{(\S)\s*:\s*(\S)}</span>, <span class="ruby-value str">'\1..\2'</span>
-93:
-94: <span class="ruby-identifier">content</span>
-95: <span class="ruby-keyword kw">end</span></pre>
+ <pre> <span class="ruby-comment cmt"># File lib/ruby-vpi/util.rb, line 7</span>
+7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rstrip_from</span> <span class="ruby-identifier">a</span>
+8: <span class="ruby-identifier">sub</span>(<span class="ruby-node">/#{a}[^#{a}]*$/</span>, <span class="ruby-value str">''</span>)
+9: <span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file