How do I get irb to use readline, (with OS X)?

I’m sure I saw something about this somewhere, but I’ve been searching,
and haven’t found it again.

Has anybody done this? Will I have to recompile ruby?

Sam