Correct usage of which/that
When is it appropriate to use 'that' as opposed to 'which'?
I'm not a native English speaker and I must confess I'm quite confused about when I should use
which in place of
that and viceversa.
Is there a particular rule?
For example, let's take this sentence.
The method returns a
Whois::Answerinstance which essentially looks and behaves like a
Stringbut it's way more powerful than a string.
which correct or should I have used
A few more examples:
It also includes a huge set of data parsers which converts a raw registry response into a pure Ruby object.
The only exception to this rule is the
Timeout::Errorexception which is intentionally left unmanaged.