[
https://issues.apache.org/jira/browse/AVRO-1989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16766174#comment-16766174
]
ASF subversion and git services commented on AVRO-1989:
-------------------------------------------------------
Commit c62a8f9d11c85c18a9df1f28d23fe0396f7766b9 in avro's branch
refs/heads/master from Fokko Driesprong
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=c62a8f9 ]
AVRO-1989: Ruby schema validation should use bytesize in error msg (#451)
* AVRO-1989: Ruby schema validation should use bytesize in error msg
* AVRO-1989: Add a test to verify the behaviour
* AVRO-1989: Add a test to verify the behaviour
> Ruby schema validation for fixed types should use bytesize in error message
> ---------------------------------------------------------------------------
>
> Key: AVRO-1989
> URL: https://issues.apache.org/jira/browse/AVRO-1989
> Project: Apache Avro
> Issue Type: Bug
> Components: ruby
> Affects Versions: 1.9.0
> Reporter: Sean Busbey
> Assignee: Sean Busbey
> Priority: Minor
> Fix For: 1.9.0
>
> Attachments: AVRO-1989.0.patch
>
>
> From AVRO-1886:
> I'd like to get one thing improved, but it's fine as a follow-on.
> {code}
> + when :fixed
> + if datum.is_a? String
> + message = "expected fixed with size #{expected_schema.size},
> got \"#{datum}\" with size #{datum.size}"
> + result.add_error(path, message) unless datum.bytesize ==
> expected_schema.size
> + else
> + result.add_error(path, "expected fixed with size
> #{expected_schema.size}, got #{actual_value_message(datum)}")
> + end
> {code}
> the message here should use datum.bytesize instead of datum.size.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)