IRB, CR/LF, and Jedit

Win-XP, Ruby 1.8.2

What does IRB read when I hit "Enter"? CR? LF? Both?

I ask because I am trying to use IRB in the JEdit console. JEdit Console
sends the OSes value of line.separator to the process when you press Enter.
But this seems to be read by IRB as 2 enters (or a CR + LF, or something),
since it echoes the prompt twice, the second in "continuation line" mode.
    irb(main):001:0> 2 + 2
    2 + 2

    => 4

    irb(main):002:0>
    irb(main):003:0*

This does not happen in IRB in the usual DOS command shell. So what should
JEdit console be sending to IRB?

Also, has anyone worked out how to feed Ruby code into the JEdit structure
browser to get good folding and code browsing?

Thanks!