When you are 'stuck' in IRB it is usually because of an unmatched closing delimiter, such as a single quote not matching a double quote.
For this specific question it is due to being in a Regexp object, of which the delimiter is a '/' that you have pressed. This is identical in action to having an open quote that you don't close. As soon as you end the forward slash to close the Regexp, you will find yourself on the next prompt, and you will see some return from IRB on the line prior to your cursor location. So, it is appropriate to simply close the delimiter.
Perhaps, and this can only be a fishing expedition, you meant to ignore the return at the end of the line instead, and when you should have used the backslash ('\') you used the forward slash?
Control-C is kind of heavy handed, as it attempts to send an interrupt. Control-D is the EOD
or End of Data* character, and so will generally let IRB know that you are done inputting data on the line (or stream).
This works for more than simply IRB and can get you out of some pretty tough places, without terminating the application that is running. Allowing you to have a graceful exit, or even continue running the program, and correcting your mistake, such as happens sometimes in IRB.
Of course, if that fails, then try control-c
it will likely be just heavy handed enough to get you through.
*: historically, EOT
or "End of Tape" or "End of Transmission". It may be simply my mnemonic to relate it to 'data' as in a stream of input.