
Issue #20808 has been updated by byroot (Jean Boussier). Proposed patch: https://github.com/ruby/pp/pull/29 ---------------------------------------- Bug #20808: Data#pretty_print doesn't handle private or remove attribute readers https://bugs.ruby-lang.org/issues/20808#change-110494 * Author: maicolben (Maicol Bentancor) * Status: Open * ruby -v: 3.3.5 * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Given the next code: ``` Dog = Data.define(:name) do def inspect "Hello!" end private attr_reader :name end Dog.new(name: "Fido") ``` It throws an error: - An error occurred when inspecting the object: #<NoMethodError: private method `name' called for an instance of Dog> And isn't using my `inspect` function -- https://bugs.ruby-lang.org/