diff --git a/CHANGELOG.md b/CHANGELOG.md index cc64b5dc..fc0f1bff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.9.1 (2022-05-27) +* Bugfix + * add backward compatible for Elixir < 1.13 (thanks to ja-jimenez) + ## 0.9.0 (2022-05-21) * Enhancements * add colored log output diff --git a/lib/mongo.ex b/lib/mongo.ex index 7571c70e..6f1d5af6 100644 --- a/lib/mongo.ex +++ b/lib/mongo.ex @@ -1824,7 +1824,8 @@ defmodule Mongo do end defp to_iodata(doc) do - opts = Inspect.Opts.new([]) + default_inspect_fun = :persistent_term.get({Inspect.Opts, :inspect_fun}, &Inspect.inspect/2) + opts = %Inspect.Opts{inspect_fun: default_inspect_fun} doc = doc diff --git a/mix.exs b/mix.exs index e217de1c..226670c2 100644 --- a/mix.exs +++ b/mix.exs @@ -2,7 +2,7 @@ defmodule Mongodb.Mixfile do use Mix.Project @source_url "https://github.com/zookzook/elixir-mongodb-driver" - @version "0.9.0" + @version "0.9.1" def project() do [