Skip to content

Commit d5c8188

Browse files
authored
Merge pull request github#9330 from github/nickrolfe/ruby-typos
Ruby: fix spelling errors
2 parents 0b6e35a + 385e442 commit d5c8188

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

ruby/ql/lib/codeql/ruby/ast/Parameter.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class NamedParameter extends Parameter, TNamedParameter {
109109
final VariableAccess getDefiningAccess() {
110110
result = this.getVariable().getDefiningAccess()
111111
or
112-
result = this.(SimpleParameterSynthImpl).getDefininingAccess()
112+
result = this.(SimpleParameterSynthImpl).getDefiningAccess()
113113
}
114114

115115
override AstNode getAChild(string pred) {

ruby/ql/lib/codeql/ruby/ast/Variable.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class VariableAccess extends Expr instanceof VariableAccessImpl {
116116
predicate isImplicitWrite() {
117117
implicitWriteAccess(toGenerated(this))
118118
or
119-
this = any(SimpleParameterSynthImpl p).getDefininingAccess()
119+
this = any(SimpleParameterSynthImpl p).getDefiningAccess()
120120
or
121121
this = any(HashPattern p).getValue(_)
122122
or

ruby/ql/lib/codeql/ruby/ast/internal/Parameter.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class SimpleParameterRealImpl extends SimpleParameterImpl, TSimpleParameterReal
3838
class SimpleParameterSynthImpl extends SimpleParameterImpl, TSimpleParameterSynth {
3939
SimpleParameterSynthImpl() { this = TSimpleParameterSynth(_, _) }
4040

41-
LocalVariableAccessSynth getDefininingAccess() { synthChild(this, 0, result) }
41+
LocalVariableAccessSynth getDefiningAccess() { synthChild(this, 0, result) }
4242

4343
override LocalVariable getVariableImpl() { result = TLocalVariableSynth(this, _) }
4444

ruby/ql/src/queries/security/cwe-116/IncompleteSanitization.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ replace further instances of the string that result from earlier replacements.
4444
</p>
4545
<p>
4646
For example, consider the code snippet <code>s.gsub /\/\.\.\//, ""</code>, which attempts to strip
47-
out all occurences of <code>/../</code> from <code>s</code>. This will not work as expected: for the
47+
out all occurrences of <code>/../</code> from <code>s</code>. This will not work as expected: for the
4848
string <code>/./.././</code>, for example, it will remove the single occurrence of <code>/../</code>
4949
in the middle, but the remainder of the string then becomes <code>/../</code>, which is another
5050
instance of the substring we were trying to remove.

ruby/ql/src/queries/security/cwe-116/IncompleteSanitization.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ predicate allBackslashesEscaped(DataFlow::Node node) {
116116
* Holds if `sub` looks like a string substitution call that deliberately
117117
* removes the first occurrence of `str`.
118118
*/
119-
predicate removesFirstOccurence(StringSubstitutionCall sub, string str) {
119+
predicate removesFirstOccurrence(StringSubstitutionCall sub, string str) {
120120
not sub.isGlobal() and sub.replaces(str, "")
121121
}
122122

@@ -158,8 +158,8 @@ predicate isDelimiterUnwrapper(StringSubstitutionCall leftUnwrap, StringSubstitu
158158
or
159159
left = "'" and right = "'"
160160
|
161-
removesFirstOccurence(leftUnwrap, left) and
162-
removesFirstOccurence(rightUnwrap, right) and
161+
removesFirstOccurrence(leftUnwrap, left) and
162+
removesFirstOccurrence(rightUnwrap, right) and
163163
rightUnwrap = getAMethodCall(leftUnwrap)
164164
)
165165
}

0 commit comments

Comments
 (0)