Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Set::SubclassCompatible#to_s

to_s

Alias of #inspect

Returns a string containing a human-readable representation of the set (“#<Set: {element1, element2, …}>”).