summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--ext/json/ext/generator/generator.c1
-rw-r--r--lib/json/pure/generator.rb1
3 files changed, 4 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index c048910..18da313 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+2011-06-17 (1.5.3)
+ * Alias State#configure method as State#merge to increase duck type synonymy with Hash.
2011-05-11 (1.5.2)
* Apply documentation patch by Cory Monty <cory.monty@gmail.com>.
* Add gemspecs for json and json_pure.
diff --git a/ext/json/ext/generator/generator.c b/ext/json/ext/generator/generator.c
index 5b65408..ccd6017 100644
--- a/ext/json/ext/generator/generator.c
+++ b/ext/json/ext/generator/generator.c
@@ -1353,6 +1353,7 @@ void Init_generator()
rb_define_method(cState, "depth", cState_depth, 0);
rb_define_method(cState, "depth=", cState_depth_set, 1);
rb_define_method(cState, "configure", cState_configure, 1);
+ rb_define_alias(cState, "merge", "configure");
rb_define_method(cState, "to_h", cState_to_h, 0);
rb_define_method(cState, "[]", cState_aref, 1);
rb_define_method(cState, "generate", cState_generate, 1);
diff --git a/lib/json/pure/generator.rb b/lib/json/pure/generator.rb
index 9bdfe02..9790250 100644
--- a/lib/json/pure/generator.rb
+++ b/lib/json/pure/generator.rb
@@ -212,6 +212,7 @@ module JSON
end
self
end
+ alias merge configure
# Returns the configuration instance variables as a hash, that can be
# passed to the configure method.