An Adaptive Approach to Gibbs’ Phenomenon