Skip to content

Commit 2254604

Browse files
committed
Fix rare uncounted Ruby LOC
1 parent d0d685e commit 2254604

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/ruby/RubyAnalyzer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ public String getCtagsLang() {
5858
* Gets a version number to be used to tag processed documents so that
5959
* re-analysis can be re-done later if a stored version number is different
6060
* from the current implementation.
61-
* @return 20190118_01
61+
* @return 20200410_00
6262
*/
6363
@Override
6464
protected int getSpecializedVersionNo() {
65-
return 20190118_01; // Edit comment above too!
65+
return 20200410_00; // Edit comment above too!
6666
}
6767

6868
/**

opengrok-indexer/src/main/resources/analysis/ruby/RubyProductions.lexh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
/*
2121
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
22-
* Portions Copyright (c) 2017, 2019, Chris Fraire <cfraire@me.com>.
22+
* Portions Copyright (c) 2017, 2019-2020, Chris Fraire <cfraire@me.com>.
2323
*/
2424

2525
/*
@@ -483,6 +483,7 @@ Here_EOF3 = [\`][^\r\n\`]*[\`]
483483
}
484484
// Only one char at a time due to restriction on {WhspChar} above.
485485
[^\n\r] {
486+
chkLOC();
486487
maybeIntraState();
487488
offer(yytext());
488489
}

opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/ruby/RubyXrefTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
/*
2121
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
22-
* Portions Copyright (c) 2017, 2019, Chris Fraire <cfraire@me.com>.
22+
* Portions Copyright (c) 2017, 2019-2020, Chris Fraire <cfraire@me.com>.
2323
*/
2424

2525
package org.opengrok.indexer.analysis.ruby;
@@ -45,7 +45,7 @@ public void sampleTest() throws IOException {
4545
writeAndCompare(new RubyAnalyzerFactory(),
4646
"analysis/ruby/sample.rb",
4747
"analysis/ruby/ruby_xrefres.html",
48-
readTagsFromResource("analysis/ruby/sampletags"), 159);
48+
readTagsFromResource("analysis/ruby/sampletags"), 161);
4949
}
5050

5151
@Test

opengrok-indexer/src/test/resources/analysis/ruby/ruby_xrefres.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,5 +183,7 @@
183183
<a class="l" name="177" href="#177">177</a><b>print</b> <span class="s">&apos;<a href="http://example.com">http://example.com</a>&apos;</span>
184184
<a class="l" name="178" href="#178">178</a><b>puts</b> <span class="s">&quot;Last #{</span><a href="/source/s?defs=log_lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">log_lines</a><span class="s">} lines from #{</span><a href="/source/s?defs=logfn" class="intelliWindow-symbol" data-definition-place="undefined-in-file">logfn</a><span class="s">}:&quot;</span>
185185
<a class="l" name="179" href="#179">179</a><b>print</b> <span class="s">&quot;\n&quot;</span>
186-
<a class="hl" name="180" href="#180">180</a></body>
186+
<a class="hl" name="180" href="#180">180</a>;
187+
<a class="l" name="181" href="#181">181</a>;
188+
<a class="l" name="182" href="#182">182</a></body>
187189
</html>

opengrok-indexer/src/test/resources/analysis/ruby/sample.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,5 @@ def right
177177
print 'http://example.com'
178178
puts "Last #{log_lines} lines from #{logfn}:"
179179
print "\n"
180+
;
181+
;

0 commit comments

Comments
 (0)