Dynamical ejections of stars due to an accelerating gas filament