backport Module monkey patches and  ActiveSupport::Deprecation