conditional for enhancedruby mode post-hook