We numerically studied close encounters between a young stellar system hosting a massive, gravitationally fragmenting disk and an intruder diskless star with the purpose to determine the evolution of fragments that have formed in the disk prior to the encounter. Numerical hydrodynamics simulations in the non-inertial frame of reference of the host star were employed to simulate the prograde and retrograde co-planar encounters. The initial configuration of the target system (star plus disk) was obtained via a separate numerical simulation featuring the gravitational collapse of a solar-mass pre-stellar core. We found that close encounters can lead to the ejection of fragments that have formed in the disk of the target prior to collision. In particular, prograde encounters are more efficient in ejecting the fragments than the retrograde encounters. The masses of ejected fragments are in the brown-dwarf mass regime. They also carry away an appreciable amount of gas in their gravitational radius of influence, implying that these objects may possess extended disks or envelopes, as also suggested by Thies et al. (2015). Close encounters can also lead to the ejection of entire spiral arms, followed by fragmentation and formation of freely-floating objects straddling the planetary mass limit. However, numerical simulations with a higher resolution are needed to confirm this finding.