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

BSON::OrderedHash#inspect is confusing

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.4.0
    • Affects Version/s: 1.3.1
    • Component/s: None
    • Environment:
      Mac OS X 10.6, REE 1.8.7-2001.03

      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.

            Assignee:
            kbanker Kyle Banker
            Reporter:
            jlecour Jérémy Lecour
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: