Skip to content

Java types should simply toString on inspect? #5182

@kares

Description

@kares

Java types inspect isn't as useful as for Ruby objects.
When using Ruby tools it usually just shows the type but no real information, e.g.

  2) Date"to_java java 8 types coerces to java.time.Instant
     Failure/Error: DEFAULT_FAILURE_NOTIFIER = lambda { |failure, _opts| raise failure }

       expected: #<Java::JavaTime::Instant:0x25ce9dc4>
            got: #<Java::JavaTime::Instant:0x17f62e33>

       (compared using ==)

       Diff:
       @@ -1,2 +1,2 @@
       -#<Java::JavaTime::Instant:0x25ce9dc4>
       +#<Java::JavaTime::Instant:0x17f62e33>
     # ./spec/java_integration/types/coercion_spec.rb:946:in `block in (root)'

its likely a breaking change -> so only to be done in a major version such as 9.2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions