[ruby-core:124446] [Ruby Feature#17210] More readable and useful `Set#inspect`
Issue #17210 has been updated by hsbt (Hiroshi SHIBATA). Status changed from Assigned to Closed ``` ❯ ruby -ve "puts Set[1,2,3]" ruby 4.1.0dev (2026-01-06T23:05:30Z master b2ed4cdced) +YJIT +MN +PRISM [arm64-darwin25] Set[1, 2, 3] ``` Ruby 4.0 introduced this feature request. ---------------------------------------- Feature #17210: More readable and useful `Set#inspect` https://bugs.ruby-lang.org/issues/17210#change-115994 * Author: marcandre (Marc-Andre Lafortune) * Status: Closed * Assignee: knu (Akinori MUSHA) ---------------------------------------- I would like to change `Set#inspect`/`to_s`: ```ruby # before puts Set[1,2,3] # => "#<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/
participants (1)
-
hsbt (Hiroshi SHIBATA)