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

Union incorrectly implements ==

VotersStop watchingWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment