From: mgarriss Date: 2003-08-27T03:00:11+09:00 Subject: Re: Readline history, and general binary module doc Mark J. Reed wrote: >Where can I find documentation for standard library modules >that are binaries rather than Ruby code? For example, >Ruby comes with readline support, but as far as I can tell >no documentation. And since it's a .so I can't easily just look >at the source (although I can always unpack the Ruby source distribution >and dig that way). I didn't see anything about it in my copy of the Pickaxe, >either. > >Anyway, my specific question is this: how do I configure the readline history? >If I just do this: > > ruby -rreadline -e 'Readline.readline; Readline.readline' > >I have full editing capability on the input line, but no history; >on the second one, I can't move up to the value I entered the >first time. But the same code executed in irb gives me access to >the history (shared with the lines entered into irb itself). > >-Mark > If you're feeling brave you could read the ./ext/readline/readline.c file under the ruby source tree. I often have to look in .c files to see what methods I have available to me. :) Michael