[ 
https://issues.apache.org/jira/browse/THRIFT-3176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

István Karaszi updated THRIFT-3176:
-----------------------------------
    Attachment: union-eql-fix.patch

> Union incorrectly implements ==
> -------------------------------
>
>                 Key: THRIFT-3176
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3176
>             Project: Thrift
>          Issue Type: Bug
>          Components: Ruby - Library
>            Reporter: István Karaszi
>         Attachments: union-eql-fix.patch
>
>
> If you would like to compare a String or any other objects which do not 
> implement `get_set_field` and `get_value` it fails.
> Example:
>  
> {noformat}
> 2.1.5 :003 > u = Thrift::Union.new
>  => <Thrift::Union >
> 2.1.5 :004 > u == ''
> NoMethodError: undefined method `get_set_field' for "":String
>       from 
> /Users/ikaraszi/.rvm/gems/ruby-2.1.5/gems/thrift-0.9.2.0/lib/thrift/union.rb:90:in
>  `=='
>       from (irb):4
>       from /Users/ikaraszi/.rvm/rubies/ruby-2.1.5/bin/irb:11:in `<main>'
> {noformat}



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

Reply via email to