changed pop and shift filters to proxies ruby calls see #2892

Why the temp variable here and above?