Forum: Ruby Entering a newline in the windows command prompt

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Simon C. (Guest)
on 2008-10-13 18:53
(Received via mailing list)
Took me a while to figure this out and thought it might be useful.
Basically, you use a caret and hit enter twice.  It goes like this:

  % ruby -e 'puts ARGV.inspect' 'line one^
  More?
  More? line two'
  ["line one\nline two"]
This topic is locked and can not be replied to.