readline gurus,

Is there anyway to gain access to the readline extension's line  
buffer from Ruby?  The gnu readline docs show mechanisms for doing so  
but it doesn't look like the ruby extension wraps these.  I don't  
want to enhance the extension as this makes deploying my app a bit  
more involved so I am looking for a pure Ruby way to gain access.

My reason for wanting this is to have a context dependent completion  
function (i.e. it depends on which 'word' you are on).  I have been  
able to fake this by changing the complete_word_break_character to a  
non useful character (7 - bell).  This gave me the whole line to  
complete with.  Unfortunately tab tab (to show the list of possible  
completion) now includes the line as a prefix to the possible  
completion values.

Any ideas?

Dave.