@@ -232,16 +232,16 @@ specific to the specification:
232232``BSON::Binary``
233233----------------
234234
235- Use ``BSON::Binary`` objects to store arbitrary binary data. The ``Binary``
236- objects can be constructed from binary strings as follows :
235+ Use ``BSON::Binary`` objects to store arbitrary binary data. You can construct
236+ ``Binary`` objects from binary strings, as shown in the following code :
237237
238238.. code-block:: ruby
239239
240240 BSON::Binary.new("binary_string")
241241 # => <BSON::Binary:0x47113101192900 type=generic data=0x62696e6172795f73...>
242242
243243By default, ``Binary`` objects are created with BSON binary subtype 0
244- (``:generic``). The subtype can be explicitly specified to indicate that
244+ (``:generic``). You can explicitly specify the subtype to indicate that
245245the bytes encode a particular type of data:
246246
247247.. code-block:: ruby
@@ -252,8 +252,8 @@ the bytes encode a particular type of data:
252252Valid subtypes are ``:generic``, ``:function``, ``:old``, ``:uuid_old``,
253253``:uuid``, ``:md5`` and ``:user``.
254254
255- The data and the subtype can be retrieved from ``Binary `` instances using
256- ``data `` and ``type`` attributes , as follows :
255+ You can use the ``data`` and ``type `` attributes to retrieve a
256+ ``Binary `` object's data and the subtype , as shown in the following code :
257257
258258.. code-block:: ruby
259259
@@ -263,6 +263,10 @@ The data and the subtype can be retrieved from ``Binary`` instances using
263263 binary.type
264264 => :user
265265
266+ You can compare ``Binary`` objects by using the ``<=>`` operator, which allows
267+ you to sort objects that have the same binary subtype. To compare ``Binary`` objects,
268+ ensure that you install v5.0.2 or later of the BSON library.
269+
266270.. note::
267271
268272 ``BSON::Binary`` objects always store the data in ``BINARY`` encoding,
0 commit comments