The surgery theorem of Wraith states that positive Ricci curvature is preserved under surgery if certain metric and dimensional conditions are satisfied. We generalize this theorem as follows: instead of attaching a product of a sphere and a disc, we glue a sphere bundle over a manifold with a so-called core metric, a type of metric which was recently introduced by Burdick to construct metrics of positive Ricci curvature on connected sums. As applications we extend a result of Burdick on the existence of core metrics on certain sphere bundles and obtain new examples of 6-manifolds with metrics of positive Ricci curvature.