From: zverok.offline@... Date: 2017-06-23T13:57:10+00:00 Subject: [ruby-core:81756] [Ruby trunk Feature#13676] to_s method is not overriden for Set Issue #13676 has been updated by zverok (Victor Shepelev). > What do you want to do? > If you want a list of the elements, use to_a. > If you want to see what elements it has, use inspect. Isn't it just a decent behavior for any value object to have a readable `to_s` representation?.. Say, for cases like puts-debugging (`puts "Comparing #{set1} to #{set2}..."`) or developer-friendly error messages (`raise "Input was expected to have 4 elements, #{set} received"`). ---------------------------------------- Feature #13676: to_s method is not overriden for Set https://bugs.ruby-lang.org/issues/13676#change-65453 * Author: razor (Marat Chardymov) * Status: Feedback * Priority: Normal * Assignee: * Target version: ---------------------------------------- When I call ~~~ ruby s1 = Set.new s1<<'tic'<<'tac' s1.to_s ~~~ I'd expect ['tic', 'tac'] values being printed, not "#" -- https://bugs.ruby-lang.org/ Unsubscribe: