Press ctrl+D
and then return; you'll get a syntax error for whatever statement you've failed to terminate, and you'll be able to start a fresh statement:
irb(main):001:0> ziuhas'
irb(main):002:0' ^D
irb(main):002:0>
SyntaxError: (irb):1: unterminated string meets end of file
from /Users/matthew.eagar/.rbenv/versions/1.9.3-p327/bin/irb:12:in `<main>'