For what it's worth, I'd prefer it to produce the newline as well.

Daniel Luz wrote:
> No comments? I guess I'm the only one who feels quite bothered by
> irb's behavior then. :(
>
> On Tue, Sep 9, 2008 at 00:39, Daniel Luz <dev / mernen.com> wrote:
>   
>> Other interactive interpreters (namely `python`, `lua`, `psh`, and
>> SpiderMonkey's `js`) emit a newline before exiting when fed an EOF
>> (^D). This is a nice feature, as it makes your usual shell prompt
>> start on its own line rather than appear on the same line as the
>> interactive interpreter's prompt when you leave by pressing ^D, for
>> instance. Any reason for irb not to do the same?
>>
>> I tried to make it behave as I wished, and the attached patch is the
>> trivial solution I found. I should note, though, that I'm not
>> familiarized with irb's source code, and this was a very quick hack;
>> maybe this isn't the best place to implement the changes then.
>>
>> The patch is for the ruby_1_8_7 branch, by the way; on Ruby 1.9, it
>> seems to be one line off.
>>
>> --
>> Daniel Luz
>>     
>
>
>