@@ -4,7 +4,7 @@ module TwoFer
4
4
no_module : "No module or class called TwoFer" ,
5
5
no_method : "No method called two_fer" ,
6
6
splat_args : "Rather than using *%s, how about actually setting a parameter called 'name'?" ,
7
- missing_default_param : "There is not a correct default param - the tests will fail" ,
7
+ missing_default_param : "There is no correct default param - the tests will fail" ,
8
8
incorrect_default_param : "You could set the default value to 'you' to avoid conditionals" ,
9
9
string_building : "Rather than using string building, use interpolation" ,
10
10
kernel_format : "Rather than using the format method, use interpolation" ,
@@ -146,7 +146,7 @@ def check_for_conditional_on_default_argument!
146
146
# method rather than insist on it being the first line.
147
147
return unless loc . type == :if
148
148
149
- # Get the clause of the conditional (ie the bit after the "if" keyword)
149
+ # Get the clause of the conditional (i.e. the bit after the "if" keyword)
150
150
conditional = extract_conditional_clause ( loc )
151
151
152
152
# Let's warn about using a better default if they `if name == nil`
@@ -155,7 +155,7 @@ def check_for_conditional_on_default_argument!
155
155
disapprove! ( :incorrect_default_param )
156
156
end
157
157
158
- # Same thing but if they do it the other way round, ie `if nil == name`
158
+ # Same thing but if they do it the other way round, i.e. `if nil == name`
159
159
if conditional . receiver == default_argument &&
160
160
is_lvar? ( conditional . first_argument , :name )
161
161
disapprove! ( :incorrect_default_param )
0 commit comments