Skip to content

Error with Ruby 3 #1

@ryoung

Description

@ryoung

I'm getting an error with Ruby 3.
I'm using the library like this:

class Issue
      WebApi.t12n.define_schema("Issue") do
        attrs(
          :id,
          :created_at,
          :updated_at,
          :number,
          :due_date,
          :reported_at,
          :summary,
          :description,
          :resolved_meter_variance,
          :resolved_secondary_meter_variance,
          :resolved_date_variance_in_days,
          :resolved_at,
          :closed_at
        )
    end
    .....
    associated_attrs(:custom_field, &:custom_fields)
end

Stack trace with error when class is loaded because of the associated_attrs line

lib/t12n/serializer.rb:13:in 'from_proc': Unexpected proc arity: -2 (T12n::ArgumentError)
lib/t12n/schema_builder.rb:38:in 'associated_attrs'
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions