diff options
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | ext/json/ext/generator/generator.c | 1 | ||||
-rw-r--r-- | lib/json/pure/generator.rb | 1 |
3 files changed, 4 insertions, 0 deletions
@@ -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. |