Exactly how does IO#puts determine if an argument is an array? That is,
how do I construct an object that is treated like an Array object by
IO#puts, preferably without inheriting from Array – I had hoped a #to_arr method would suffice, but alas, it did not.
Exactly how does IO#puts determine if an argument is an array? That is,
how do I construct an object that is treated like an Array object by
IO#puts, preferably without inheriting from Array – I had hoped a #to_arr method would suffice, but alas, it did not.
Oooops, it was #to_ary, and it’s working like a charm
Sorry to have bothered you!
Daniel
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.