From 9e7fc33e35195f7badf2d0eb4f68ca2facec0404 Mon Sep 17 00:00:00 2001 From: Anupam Sengupta Date: Wed, 27 Dec 2023 12:49:58 -0500 Subject: [PATCH 1/2] Clarified the comment for parsing a string or hash back to a tree object. The `create_additions: true` option is **needed* for the parsing to work. See issue . --- lib/tree/utils/json_converter.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/tree/utils/json_converter.rb b/lib/tree/utils/json_converter.rb index fa225cd..2a39b39 100644 --- a/lib/tree/utils/json_converter.rb +++ b/lib/tree/utils/json_converter.rb @@ -4,9 +4,9 @@ # # Author:: Anupam Sengupta (anupamsg@gmail.com) # -# Time-stamp: <2022-06-20 22:16:46 anupam> +# Time-stamp: <2023-12-27 12:46:07 anupam> # -# Copyright (C) 2012, 2013, 2014, 2015, 2022 Anupam Sengupta +# Copyright (C) 2012, 2013, 2014, 2015, 2022, 2023 Anupam Sengupta # # All rights reserved. # @@ -100,11 +100,14 @@ module ClassMethods # representation. Note that this method should *NOT* be called directly. # Instead, to convert the JSON hash back to a tree, do: # - # tree = JSON.parse(the_json_hash) + # tree = JSON.parse(the_json_hash, create_additions: true) # # This operation requires the {JSON gem}[http://flori.github.com/json/] to # be available, or else the operation fails with a warning message. # + # Note the +create_additions: true+ option, which is *required* for + # successfully parsing the string or hash. + # # @author Dirk Breuer (http://github.com/railsbros-dirk) # @since 0.7.0 # From 22812273375c332520d5bd87804c165528e993a5 Mon Sep 17 00:00:00 2001 From: Anupam Sengupta Date: Wed, 27 Dec 2023 12:53:16 -0500 Subject: [PATCH 2/2] Updated the version to 2.0.3. --- Gemfile.lock | 2 +- lib/tree/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5498ef2..4851d3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rubytree (2.0.2) + rubytree (2.0.3) json (~> 2.0, > 2.3.1) GEM diff --git a/lib/tree/version.rb b/lib/tree/version.rb index b9b81be..802d8fb 100644 --- a/lib/tree/version.rb +++ b/lib/tree/version.rb @@ -35,5 +35,5 @@ module Tree # Rubytree Package Version - VERSION = '2.0.2' + VERSION = '2.0.3' end