Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 382 Bytes

iterating-over-specific-types.md

File metadata and controls

19 lines (14 loc) · 382 Bytes

Iterating over specific types

ObjectSpace.each_object(String) do |object|
  p object
end

# Result:
# "block in dependent_specs"
# "block in dependent_specs"
# "block (3 levels) in dependent_gems"
# "block (3 levels) in dependent_gems"
# ... (huge output suppressed)
# "This rdoc is bundled with Ruby"

View Source