Used join instead of to_s for printing. Change in ruby behavior in 2.1.0