Need help with edit_redo

Hello,

I am using a Ruby TkText widget [I called it retrieve_text] and am
trying
to determine when there is nothing to undo before I call
retrieve_text.edit_undo so that I do not get the Application Error
window
popping up telling me such. I have the same problem using .edit_redo.

Any help would be greatly appreciated. I am using ActiveTcl 8.4.19.1

Thanks.

Harry