Skip to content

Add meaningful #inspect to classes #40

@zverok

Description

@zverok

Imagine irb session:

SymEngine::Symbol.new('x')
# currently:
# => #<SymEngine::Symbol:0x8571680>
# should be:
# => #<SymEngine::Symbol(x)>
SymEngine::Symbol.new('x') + SymEngine::Symbol.new('y')
# currently:
# => #<SymEngine::Add:0x842e0d4>
# should be:
# => #<SymEngine::Add(x+y)>

...and so on.

I assume, pretty simple code, wrapping #to_s into common for Ruby #<#{self.class}(#{to_s})> will play, at least for the start.

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