[ 
https://issues.apache.org/jira/browse/AVRO-1688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14623245#comment-14623245
 ] 

Sean Busbey commented on AVRO-1688:
-----------------------------------

{quote}
I'm not sure exactly which version it changed in, but it's a problem in later 
versions of Ruby (which we should support).
{quote}

it changed in 1.9.1 (which is early in the 1.9 line). agreed that we should be 
handling this.

{quote}
Users will only get unexpected results with unions of double and long if they 
do equality tests. The semantics of equality between Bignum and Float changed 
in Ruby itself, so I don't think we need to make any changes in Avro.
{quote}

I'm not sure I follow. The test looks like it declares a default value for the 
union to be an instance of the double type. It then makes a record that relies 
on that default and finds that the values are not equal. Shouldn't both of them 
be Float? 

> Ruby test_union(TestIO) is failing
> ----------------------------------
>
>                 Key: AVRO-1688
>                 URL: https://issues.apache.org/jira/browse/AVRO-1688
>             Project: Avro
>          Issue Type: Bug
>          Components: ruby
>            Reporter: Tom White
>            Assignee: Tom White
>            Priority: Blocker
>             Fix For: 1.8.0
>
>         Attachments: AVRO-1688.patch
>
>
> The failure message is
> {noformat}
>   1) Failure:
> test_union(TestIO) [/Users/tom/workspace/avro/lang/ruby/test/test_io.rb:340]:
> <-3372032630846393039> expected but was
> <-3.372032630846393e+18>.
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to