Skip to content

Commit 69bc12d

Browse files
committed
Fix spelling/wording in qhelp for rb/uninitialized-local-variable
1 parent b4c98b4 commit 69bc12d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ruby/ql/src/queries/variables/UninitializedLocal.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## Description
44
In Ruby, it is not necessary to explicitly initialize variables.
5-
If a local variable has not been explicitly initialized, it will have the value `nil`. If this happens unintended, though, the variable will not represent an object with the expected methods, and a method call on the variable will raise a `NoMethodError`.
5+
If a local variable has not been explicitly initialized, it will have the value `nil`. If this happens unintentionally, though, the variable will not represent an object with the expected methods, and a method call on the variable will raise a `NoMethodError`.
66

77
## Recommendation
88

9-
Ensure that the variable cannot be `nil` at the point hightligted by the alert.
9+
Ensure that the variable cannot be `nil` at the point highlighted by the alert.
1010
This can be achieved by using a safe navigation or adding a check for `nil`.
1111

12-
Note: You do not need to explicitly initialize the variable, if you can make the program deal with the possible `nil` value. In particular, initializing the variable to `nil` will have no effect, as this is already the value of the variable. If `nil` is the only possibly default value, you need to handle the `nil` value instead of initializing the variable.
12+
Note: You do not need to explicitly initialize the variable, if you can make the program deal with the possible `nil` value. In particular, initializing the variable to `nil` will have no effect, as this is already the value of the variable. If `nil` is the only possible default value, you need to handle the `nil` value instead of initializing the variable.
1313

1414
## Examples
1515

0 commit comments

Comments
 (0)