# Ruby, Serialization, and Enumeration

DevFeed: [Ruby, Serialization, and Enumeration](<https://devfeed.tech/articles/ruby-serialization-and-enumeration-15831.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/ruby-serialization-and-enumeration>)

Author: Square Engineering

Published: 2014-05-25T16:06:00Z

Content type: article

Language: en

Sources: [Square Corner Blog RSS Feed](<https://devfeed.tech/sources/square-corner-blog-rss-feed.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [IO](<https://devfeed.tech/topics/io.md>)

Tags: [engineering](<https://devfeed.tech/tags/engineering.md>), [enumeration](<https://devfeed.tech/tags/enumeration.md>), [io](<https://devfeed.tech/tags/io.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [serialization](<https://devfeed.tech/tags/serialization.md>)

## AI overview

A Ruby serialization failure is traced to ActiveSupport serializing instance variables, including an unused logger, and to Ruby IO objects being enumerable. The article explains how to diagnose the backtrace and recommends implementing to_hash to control JSON output.

## Source excerpt

In which a curious backtrace uncovers scandalous truths about ActiveSupport and Ruby's IO object.