Reputation: 16339
Is there any specific difference between these conditions?
1)
begin
acct = 1
return 0
end unless self.l_acct.nil?
2)
unless self.l_acct.nil?
acct = 1
return 0
end
Upvotes: 1
Views: 92
Reputation: 8785
Yes; the former is bad practice, the latter is not. They both accomplish the same thing.
Upvotes: 2