
332 A.2d 128 (1975)
ESQUIRE SWIMMING POOL PRODUCTS, INC.
v.
Harry C. PITTMAN et ux.
No. 73-226-Appeal.
Supreme Court of Rhode Island.
February 3, 1975.
Reargument Denied February 13, 1975.
*129 Matthew F. Callaghan, Jr., John F. Cuzzone, Jr., for Providence, for plaintiff.
F. Monroe Allen, Providence, for defendants.

OPINION
ROBERTS, Chief Justice.
This civil action was commenced on August 18, 1964, to recover the cost of services rendered and goods provided the defendants pursuant to a contract. At the time of the institution of the action, the plaintiff was doing business under the name of Aquacade Pools, Inc. (Aquacade). Subsequently, in December of 1964, the plaintiff changed its corporate name from Aquacade Pools, Inc. to Esquire Swimming Pool Products, Inc. (Esquire). In 1968, about 4 years prior to the trial in the Superior Court, the defendants in effect admitted, by refusing to answer the plaintiff's request for an admission, that Esquire was the sole plaintiff in this case.
The case was tried to a justice of the Superior Court sitting without a jury, and *130 defendants then for the first time challenged plaintiff's right to bring the suit, arguing that Aquacade, and not Esquire, had rendered the service and sold and delivered the goods for which payment was sought. Consequently, they argued, Aquacade, and not Esquire, was the proper party plaintiff. At the close of the evidence the trial justice ruled that defendants had raised the issue of plaintiff's status as a real party in interest in an untimely manner and had thereby waived the defense. The trial court thereupon found for plaintiff, and from that judgment defendants are now appealing.
The defendants' contention of error is twofold: First, that the trial justice erred in refusing to sustain defendants' objection made pursuant to Super. R. Civ. P. 17(a) to plaintiff's being the real party in interest and, second, that he erred in deciding for plaintiff because plaintiff had failed to introduce evidence tending to prove its own right to recover an obligation that defendants owed to Aquacade.
Rule 17(a) requires that every action "be prosecuted in the name of the real party in interest." The purpose of this rule is "* * * to protect the defendant against a subsequent action by the party actually entitled to recover, and to ensure generally that the judgment will have its proper effect as res judicata." Advisory Committee Note to 1966 Amendment to Fed. R. Civ. P. 17(a). To invoke the protection of this rule, a defendant must object with reasonable promptness to the plaintiff's bringing suit. Undue delay in making such a challenge may result in the defendant's being deemed to have waived his right to raise this objection. 1 Kent, R.I. Civ. Prac. § 17.1 (1969); 6 Wright & Miller, Federal Practice & Procedure: Civil § 1554 (1971). See Pace v. General Elec. Co., 55 F.R.D. 215 (W.D.Pa. 1972) (dictum). The determination of what constitutes "reasonable promptness" may vary with the circumstances of each case and should rest within the sound discretion of the trial justice. See 3A Moore, Federal Practice ¶ 17.15-1 (2d ed. 1967); 6 Wright & Miller, supra, § 1554. Whether an objection made to invoke the protection of Rule 17(a) was so unreasonably delayed as to evidence a waiver of the right to object under that rule is a matter within the sound judicial discretion of the trial justice and will be reversed by this court only upon a showing that the ruling constituted an abuse of judicial discretion.
In many respects an assertion that the plaintiff is not the real party in interest is similar to an affirmative defense, see Blau v. Lamb, 314 F.2d 618 (2d Cir.1963), cert. denied, 375 U.S. 813, 84 S.Ct. 44, 11 L.Ed.2d 49 (1963), and accordingly should be raised, if not in the pleadings, as early as possible to place the plaintiff on notice of what he must prove in addition to the basic elements of his case. The Superior Court Rules of Civil Procedure, including Rule 17(a), were designed "to secure the just, speedy, and inexpensive determination" of the rights and liabilities of the litigants in every action in the Superior Court. See Super. R. Civ. P. 1. These rules represent a rejection of the practice of using procedural rules to trick or catch one's opponent off guard. See Surowitz v. Hilton Hotels Corp., 383 U.S. 363, 86 S.Ct. 845, 15 L.Ed.2d 807 (1966); cf. Conley v. Gibson, 355 U.S. 41, 48, 78 S.Ct. 99, 103, 2 L.Ed.2d 80, 86 (1957). Thus, this court will not permit a defendant to withhold his objection under Rule 17(a) until the eleventh hour in order to entrap the plaintiff. Requiring early disposal of the question of the plaintiff's status as the real party in interest would avoid the unfairness resulting from entrapment and the undue expenditure of judicial and litigants' resources incurred when a suit which has proceeded to trial is ultimately dismissed because the plaintiff was not the real party in interest.
Certainly where defendants were not prejudiced by the suit being brought *131 in the name of Esquire instead of Aquacade, they should not be permitted to wait until trial to raise the Rule 17(a) defense. Nothing in the record suggests that defendants were ignorant of the real party in interest or the actual claims involved. It appears that their delay in raising this defense resulted merely from an attempt to entrap plaintiff. The importance of maintaining the availability of that defense for the protection of defendants is outweighed in such a case by the interest of the court in avoiding the waste of judicial effort and litigants' resources by permitting such a defense to be raised during trial and thereby causing dismissal of the action at that point. In these circumstances, it cannot be said that the trial justice abused his discretion in ruling that defendants had waived their right to challenge plaintiff's statutes as the real party in interest by waiting until trial to make such a challenge.
We find no merit to the defendants' second contention, that insufficient evidence was introduced to establish Esquire's right to compensation by the defendants. The defendants introduced evidence showing that Esquire was in fact the same corporate entity as Aquacade with solely a difference in name. Thus, it could reasonably be inferred from such evidence that the rights to payment for services rendered and goods delivered possessed by Aquacade were, upon the change in name, possessed by Esquire. Thus, sufficient evidence had been introduced to establish the fact that Esquire was entitled to payment for the goods and services provided by Aquacade.
The appeal of the defendants is denied and dismissed, the judgment appealed from is affirmed, and the case is remanded to the Superior Court for further proceedings consistent with this opinion.
