Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-281

BSON::OrderedHash#inspect is confusing

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:
    • Environment:
      Mac OS X 10.6, REE 1.8.7-2001.03

      Description

      Affecting values to a BSON ordered hash is working OK with string or symbol values, but the inspect is quite confusing (example from an IRB session) :

      ree-1.8.7-2011.03 :001 > bson_hash = BSON::OrderedHash.new
      => {}
      ree-1.8.7-2011.03 :002 > bson_hash['hello'] = 'bonjour'
      => "bonjour"
      ree-1.8.7-2011.03 :003 > bson_hash[:hello] = 'salut'
      => "salut"
      ree-1.8.7-2011.03 :004 > bson_hash
      =>

      {"hello"=>"bonjour", "hello"=>"salut"}

      I don't really know what would be the best way to do this, but as it is I find it confusing.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: