bson 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bson might be problematic. Click here for more details.

@@ -131,11 +131,7 @@ module BSON
131
131
  #
132
132
  # @return [String]
133
133
  def to_s
134
- str = ' ' * 24
135
- 12.times do |i|
136
- str[i * 2, 2] = '%02x' % @data[i]
137
- end
138
- str
134
+ @data.map {|e| v=e.to_s(16); v.size == 1 ? "0#{v}" : v }.join
139
135
  end
140
136
 
141
137
  def inspect
data/lib/bson.rb CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
 
5
- MINIMUM_BSON_EXT_VERSION = "1.1.3"
5
+ MINIMUM_BSON_EXT_VERSION = "1.1.4"
6
6
 
7
7
  module BSON
8
- VERSION = "1.1.3"
8
+ VERSION = "1.1.4"
9
9
  def self.serialize(obj, check_keys=false, move_id=false)
10
10
  BSON_CODER.serialize(obj, check_keys, move_id)
11
11
  end
@@ -51,6 +51,12 @@ class ObjectIdTest < Test::Unit::TestCase
51
51
  assert_equal 24, $1.length
52
52
  end
53
53
 
54
+ def test_to_s2
55
+ @o = ObjectId.new([76, 244, 52, 174, 44, 84, 121, 76, 88, 0, 0, 3])
56
+ s = '4cf434ae2c54794c58000003'
57
+ assert_equal @o.to_s, s
58
+ end
59
+
54
60
  def test_method
55
61
  assert_equal ObjectId.from_string(@o.to_s), BSON::ObjectId(@o.to_s)
56
62
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bson
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 3
10
- version: 1.1.3
9
+ - 4
10
+ version: 1.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jim Menard
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-11-29 00:00:00 -05:00
20
+ date: 2010-11-30 00:00:00 -05:00
21
21
  default_executable:
22
22
  dependencies: []
23
23