Skip to content

Struct strange output #361

@StefanoMartin

Description

@StefanoMartin

I noticed a strange behavior when I use awesome print with Struct and one of the attribute is ":s"+other_attribute.

Here an example:

require "awesome_print"
require "ostruct"

A = Struct.new(:a, :sa)
ap A.new(1,2)

===> 
#<Struct:A:0x5561e5934cd8
    a = 1,
    attr_accessor :a = 2
>

Instead of the expected:

#<Struct:A:0x5561e5934cd8
    a = 1,
    sa = 2
>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions