We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 113565a commit 0713f2aCopy full SHA for 0713f2a
mrbgems/mruby-set/mrblib/set.rb
@@ -306,17 +306,13 @@ def join(separator = nil)
306
to_a.join(separator)
307
end
308
309
- def _inspect(recur_list)
+ def inspect
310
return "#<#{self.class}: {}>" if empty?
311
- return "#<#{self.class}: {...}>" if recur_list[self.object_id]
312
- recur_list[self.object_id] = true
313
- ary = map { |o| o._inspect(recur_list) }
+ return "#<#{self.class}: {...}>" if self.__inspect_recursive?
+ ary = map {|o| o.inspect }
314
"#<#{self.class}: {#{ary.join(", ")}}>"
315
316
317
- def inspect
318
- _inspect({})
319
- end
320
alias to_s inspect
321
322
def reset
0 commit comments