Returns a string containing a human-readable representation of the set. ("#<Set: {element1, element2, …}>")
Source Code
# File set.rb, line 401 def inspect ids = (Thread.current[InspectKey] ||= []) if ids.include?(object_id) return sprintf('#<%s: {...}>', self.class.name) end begin ids << object_id return sprintf('#<%s: {%s}>', self.class, to_a.inspect[1..-2]) ensure ids.pop end end
<code/>and<pre/>for code samples.