You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2015/06/01 22:03:17 UTC

[jira] [Resolved] (THRIFT-3176) Union incorrectly implements ==

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

Roger Meier resolved THRIFT-3176.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 0.9.3

committed

> 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
>             Fix For: 0.9.3
>
>         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)