gsub! can be risky if the calling function passes you a string, then tries to use the string after they call you.  Generally recommend:

    action = action.gsub(/-/, '_')

in these scenarios