Skip to content

Commit

Permalink
Adds the old deprecated methods of unparse(), fast_unparse(), and pre…
Browse files Browse the repository at this point in the history
…tty_unparse() to JSON_mimic.
  • Loading branch information
ohler55 committed Nov 20, 2012
1 parent e7ccd44 commit 568f6b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ A fast JSON parser and Object marshaller as a Ruby gem.

## <a name="release">Release Notes</a>

### Release 1.4.4
### Release 1.4.5

- Fixed bug in mimic that missed mimicing json_pure.
- Adds the old deprecated methods of unparse(), fast_unparse(), and pretty_unparse() to JSON_mimic.

## <a name="description">Description</a>

Expand Down
6 changes: 6 additions & 0 deletions ext/oj/oj.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,15 @@ define_mimic_json(VALUE self) {
rb_define_module_function(mimic, "restore", mimic_load, -1);
rb_define_module_function(mimic, "recurse_proc", mimic_recurse_proc, 1);
rb_define_module_function(mimic, "[]", mimic_dump_load, -1);

rb_define_module_function(mimic, "generate", mimic_generate, -1);
rb_define_module_function(mimic, "fast_generate", mimic_generate, -1);
rb_define_module_function(mimic, "pretty_generate", mimic_pretty_generate, -1);
/* for older versions of JSON, the deprecated unparse methods */
rb_define_module_function(mimic, "unparse", mimic_generate, -1);
rb_define_module_function(mimic, "fast_unparse", mimic_generate, -1);
rb_define_module_function(mimic, "pretty_unparse", mimic_pretty_generate, -1);

rb_define_module_function(mimic, "parse", mimic_parse, -1);
rb_define_module_function(mimic, "parse!", mimic_parse, -1);

Expand Down
2 changes: 1 addition & 1 deletion lib/oj/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

module Oj
# Current version of the module.
VERSION = '1.4.4'
VERSION = '1.4.5'
end

0 comments on commit 568f6b1

Please sign in to comment.