Skip to content

Commit 83e2015

Browse files
zachmccormickp-mongo
authored andcommitted
RUBY-1529 Adding ActiveSupport::TimeWithZone patch (#104)
* Adding ActiveSupport::TimeWithZone patch * Decouple bson-ruby from activesupport * Document ActiveSupport usage * Undepend shared examples on AS * Verify serialization correctness * Test AS in evergreen * Byebug is 2.0+ only
1 parent 06cda52 commit 83e2015

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docs/tutorials/bson-v4.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,20 @@ To install the gem with bundler, include the following in your Gemfile:
3434

3535
gem 'bson', '~> 4.0'
3636

37-
The BSON gem is compatible with MRI >= 1.9.3, JRuby 1.7.x, and Rubinius 2.5.x
37+
The BSON gem is compatible with MRI >= 1.9.3, JRuby >= 9.1, and Rubinius 2.5.x.
38+
39+
Use With ActiveSupport
40+
----------------------
41+
42+
Serialization for ActiveSupport-defined classes, such as TimeWithZone, is
43+
not loaded by default to avoid a hard dependency of BSON on ActiveSupport.
44+
When using BSON in an application that also uses ActiveSupport, the
45+
ActiveSupport-related code must be explicitly required:
46+
47+
.. code-block:: ruby
48+
49+
require 'bson'
50+
require 'bson/active_support'
3851

3952
BSON Serialization
4053
------------------

0 commit comments

Comments
 (0)