Yep, and to explain further; The first instance of "ruling" in a judicial sense probably derives from rule (i.e dictat/maxim).
To "rule out" is to use a ruler to cross a line through something in a written list of items, thereby eliminating it from consideration.