@@ -77,12 +77,12 @@ private int parseInteger(Ruby::Integer i) {
7777 v = values .indexOf ( c .toLowerCase ( ) ) and
7878 exp = str .replaceAll ( "_" , "" ) .length ( ) - index - 1
7979 |
80- v * values .length ( ) .pow ( exp )
80+ v * values .length ( ) .pow ( exp ) . floor ( )
8181 )
8282 )
8383}
8484
85- private class RequiredIntegerConstantValue extends RequiredConstantValue {
85+ private class RequiredIntegerLiteralConstantValue extends RequiredConstantValue {
8686 override predicate requiredInt ( int i ) { i = any ( IntegerLiteral il ) .getValue ( ) }
8787}
8888
@@ -277,7 +277,7 @@ private class FalseLiteral extends BooleanLiteral, TFalseLiteral {
277277 final override predicate isFalse ( ) { any ( ) }
278278}
279279
280- private class RequiredStringConstantValue extends RequiredConstantValue {
280+ private class RequiredEncodingLiteralConstantValue extends RequiredConstantValue {
281281 override predicate requiredString ( string s ) { s = "UTF-8" }
282282}
283283
@@ -293,7 +293,7 @@ class EncodingLiteral extends Literal, TEncoding {
293293 override ConstantValue:: ConstantStringValue getConstantValue ( ) { result .isString ( "UTF-8" ) }
294294}
295295
296- private class RequiredIntegerConstantValue2 extends RequiredConstantValue {
296+ private class RequiredLineLiteralConstantValue extends RequiredConstantValue {
297297 override predicate requiredInt ( int i ) { i = any ( LineLiteral ll ) .getLocation ( ) .getStartLine ( ) }
298298}
299299
@@ -310,7 +310,7 @@ class LineLiteral extends Literal, TLine {
310310 }
311311}
312312
313- private class RequiredStringConstantValue2 extends RequiredConstantValue {
313+ private class RequiredFileLiteralConstantValue extends RequiredConstantValue {
314314 override predicate requiredString ( string s ) {
315315 s = any ( FileLiteral fl ) .getLocation ( ) .getFile ( ) .getAbsolutePath ( )
316316 }
@@ -346,7 +346,7 @@ class StringComponent extends AstNode, TStringComponent {
346346 ConstantValue:: ConstantStringValue getConstantValue ( ) { none ( ) }
347347}
348348
349- private class RequiredStringConstantValue3 extends RequiredConstantValue {
349+ private class RequiredStringTextComponentConstantValue extends RequiredConstantValue {
350350 override predicate requiredString ( string s ) {
351351 s = any ( Ruby:: Token t | exists ( TStringTextComponentNonRegexp ( t ) ) ) .getValue ( )
352352 }
@@ -378,7 +378,7 @@ class StringTextComponent extends StringComponent, TStringTextComponentNonRegexp
378378 final override string getAPrimaryQlClass ( ) { result = "StringTextComponent" }
379379}
380380
381- private class RequiredStringConstantValue4 extends RequiredConstantValue {
381+ private class RequiredStringEscapeSequenceComponentConstantValue extends RequiredConstantValue {
382382 override predicate requiredString ( string s ) {
383383 s = any ( Ruby:: Token t | exists ( TStringEscapeSequenceComponentNonRegexp ( t ) ) ) .getValue ( )
384384 }
@@ -450,7 +450,7 @@ private string getRegExpTextComponentValue(RegExpTextComponent c) {
450450 )
451451}
452452
453- private class RequiredStringConstantValue5 extends RequiredConstantValue {
453+ private class RequiredRegExpTextComponentConstantValue extends RequiredConstantValue {
454454 override predicate requiredString ( string s ) { s = getRegExpTextComponentValue ( _) }
455455}
456456
@@ -490,7 +490,7 @@ private string getRegExpEscapeSequenceComponentValue(RegExpEscapeSequenceCompone
490490 )
491491}
492492
493- private class RequiredStringConstantValue6 extends RequiredConstantValue {
493+ private class RequiredRegExpEscapeSequenceComponentConstantValue extends RequiredConstantValue {
494494 override predicate requiredString ( string s ) { s = getRegExpEscapeSequenceComponentValue ( _) }
495495}
496496
@@ -761,7 +761,7 @@ class SymbolLiteral extends StringlikeLiteral, TSymbolLiteral {
761761// Tree-sitter gives us value text including the colon, which we skip.
762762private string getSimpleSymbolValue ( Ruby:: SimpleSymbol ss ) { result = ss .getValue ( ) .suffix ( 1 ) }
763763
764- private class RequiredSymbolConstantValue extends RequiredConstantValue {
764+ private class RequiredSimpleSymbolConstantValue extends RequiredConstantValue {
765765 override predicate requiredSymbol ( string s ) { s = getSimpleSymbolValue ( _) }
766766}
767767
@@ -795,7 +795,7 @@ private class BareSymbolLiteral extends ComplexSymbolLiteral, TBareSymbolLiteral
795795 final override StringComponent getComponent ( int i ) { toGenerated ( result ) = g .getChild ( i ) }
796796}
797797
798- private class RequiredSymbolConstantValue2 extends RequiredConstantValue {
798+ private class RequiredHashKeySymbolConstantValue extends RequiredConstantValue {
799799 override predicate requiredSymbol ( string s ) { s = any ( Ruby:: HashKeySymbol h ) .getValue ( ) }
800800}
801801
@@ -829,7 +829,7 @@ class SubshellLiteral extends StringlikeLiteral, TSubshellLiteral {
829829 final override StringComponent getComponent ( int i ) { toGenerated ( result ) = g .getChild ( i ) }
830830}
831831
832- private class RequiredStringConstantValue7 extends RequiredConstantValue {
832+ private class RequiredCharacterConstantValue extends RequiredConstantValue {
833833 override predicate requiredString ( string s ) { s = any ( Ruby:: Character c ) .getValue ( ) }
834834}
835835
@@ -1131,7 +1131,7 @@ private string getMethodName(MethodName::Token t) {
11311131 result = t .( Ruby:: Setter ) .getName ( ) .getValue ( ) + "="
11321132}
11331133
1134- private class RequiredStringConstantValue8 extends RequiredConstantValue {
1134+ private class RequiredMethodNameConstantValue extends RequiredConstantValue {
11351135 override predicate requiredString ( string s ) { s = getMethodName ( _) }
11361136}
11371137
0 commit comments