Skip to content

Commit 0c1b5c4

Browse files
committed
add backward compatible for Elixir < 1.13
1 parent d1b5286 commit 0c1b5c4

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.9.1 (2022-05-27)
9+
* Bugfix
10+
* add backward compatible for Elixir < 1.13 (thanks to ja-jimenez)
11+
812
## 0.9.0 (2022-05-21)
913
* Enhancements
1014
* add colored log output

lib/mongo.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,8 @@ defmodule Mongo do
18241824
end
18251825

18261826
defp to_iodata(doc) do
1827-
opts = Inspect.Opts.new([])
1827+
default_inspect_fun = :persistent_term.get({Inspect.Opts, :inspect_fun}, &Inspect.inspect/2)
1828+
opts = %Inspect.Opts{inspect_fun: default_inspect_fun}
18281829

18291830
doc =
18301831
doc

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule Mongodb.Mixfile do
22
use Mix.Project
33

44
@source_url "https://github.com/zookzook/elixir-mongodb-driver"
5-
@version "0.9.0"
5+
@version "0.9.1"
66

77
def project() do
88
[

0 commit comments

Comments
 (0)