From: universato@... Date: 2021-05-19T22:12:32+00:00 Subject: [ruby-core:103898] [Ruby master Feature#17210] More readable and useful `Set#inspect` Issue #17210 has been updated by universato (Yoshimine Sato). +1 I second the proposal. ```ruby p [1, 2, 3] #=> [1, 2, 3] p "hello" #=> "hello" p 1.0 #=> 1.0 p({"x"=>1}) #=> {"x"=>1} p 1..2 #=> 1..2 p nil #=> nil p true #=> true p :name #=> :name p Array #=> Array require "matrix" p Matrix[[1, 2], [3, 4]] p Vector[1, 2] ``` The output of the major classes equal to Ruby code(literal or syntax sugar). It is very useful and readable. ---------------------------------------- Feature #17210: More readable and useful `Set#inspect` https://bugs.ruby-lang.org/issues/17210#change-92022 * Author: marcandre (Marc-Andre Lafortune) * Status: Open * Priority: Normal * Assignee: knu (Akinori MUSHA) ---------------------------------------- I would like to change `Set#inspect`/`to_s`: ```ruby # before puts Set[1,2,3] # => "#" # after puts Set[1,2,3] # => "Set[1, 2, 3]" ``` This output is shorter, readable, and has the property that it corresponds to Ruby code -- https://bugs.ruby-lang.org/ Unsubscribe: