Ir / iirb on Mono

Hi All,

I’ve noticed problems with iirb and ir interactive mode on my Mac. I’m
running the 1.0-rc2 build.

With ir, I’ve noticed two things:

  1. The up arrow does not scroll through the command history. This works
    on Windows.

  2. the first character doesn’t appear, though is processed, for each
    line. For example, if I open a new ir session and type ‘puts “Hello,
    World”’ the console shows:

uts “Hello, World”

but if I hit return, the command is processed just fine. It’s literally
just the first character - I often end up hitting space then backspace
or something else before typing and then it is fine.

With iirb, I’m getting an exception just trying to run it:

cory-foys-macbook-pro:~ foyc$ iirb
IronRuby.Libraries:0:in GetExecutable': infocmp -C (Errno::ENOENT) from IronRuby.Libraries:0:in CreateProcess’
from IronRuby.Libraries:0:in `CreateProcess’
from :0:in ``’
[Stack Trace truncated]

Running infocmp -C produces:

ory-foys-macbook-pro:~ foyc$ infocmp -C

Reconstructed via infocmp from file:

xterm-color|nxterm|generic color xterm:

I’m happy to look into both of these, but wanted to see if anyone else
was seeing this before I did (or was looking at it already).

Cory F.

The command history on Windows when running ir.exe is being provided by
the Windows console subsystem; it’s not actually part of IronRuby. I
imagine that Mono’s readline library could be used to give the same
effect on non-Windows platforms.