The adverse party may cross-examine the witness as to any matter stated in his direct examination or connected therewith, and in so doing may put leading questions; but if he examines him as to other matters, such examination is subject to the same rules as a direct examination.