How to create a debuggable Ruby interpreter

I am trying to build a debuggable version of the Ruby interpreter on
RedHat Linux. The configure script for Python has a --with-pydebug
option which allows this. Is there an equivalent option for Ruby? If
not, how do I create a debuggable build in Ruby? I tried to do searches
on Google but didn’t find much.

Thanks in advance