There are trivial answers to this. Minutia of the rules of board games, or the mechanics of computer games are off topic.
Where things get muddy is when RPGs intersect with other well-studied areas. Is physics off-topic? There are certainly game situations where knowing the solution to a physics problem is necessary. What about the details of a well-known fictional universe, or the mechanics of mid-twentieth century naval vessels?
I don't really have a comprehensive answer, but these are some things that strongly suggest a question may be off-topic to me:
The question excludes RPG-centric answers without cause. The ship plans question is the best example of this, even though it ultimately generated some good answers. It would be acceptable if a reason for the exclusion of RPG resources were elaborated on (needed for a prop, for example).
The question requires a level of detail well beyond what's needed for RPGs (without explicit reason). Formal mathematical proofs, precise explanations of the operation of machinery, and so on. Note that this is different from an amazingly detailed answer being provided and accepted.
The question has no discernible tie to RPGs, and none is provided in the post. Usually this will be theoretical scientific questions, philosophy, trade knowledge, or other bits of obscura not typically used during practical play.
Some examples of bullet point number two, as it seems to have been unclear. Using Perl as an example.
Clearly off topic questions:
Off topic, as they require a level of detail well beyond that used in RPGs.
On-topic questions: