Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3176

Union incorrectly implements ==

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.3
    • Ruby - Library
    • None
    • Patch Available
    • Patch

    Description

      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:

      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>'
      

      Attachments

        1. union-eql-fix.patch
          1 kB
          István Karaszi

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ikaraszi István Karaszi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: