Ruby trace hook enhancements