From d97f1d3b3734f1d5b33d38b72b51a73062749cba Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 16 Jan 2011 12:34:53 +0000 Subject: [PATCH] merges r30475 from trunk into ruby_1_9_2. -- * ext/psych/lib/psych/json/tree_builder.rb (start_mapping): tags should not be included in JSON mapping git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/psych/lib/psych/json/tree_builder.rb | 2 +- test/psych/test_coder.rb | 4 ++++ version.h | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81ec666c39..bb42318904 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jan 6 11:27:01 2011 Aaron Patterson + + * ext/psych/lib/psych/json/tree_builder.rb (start_mapping): tags + should not be included in JSON mapping + Thu Jan 6 05:14:41 2011 Nobuyoshi Nakada * ext/stringio/stringio.c (get_strio, strio_set_string) diff --git a/ext/psych/lib/psych/json/tree_builder.rb b/ext/psych/lib/psych/json/tree_builder.rb index 91d7e6cad6..722f2a6bf1 100644 --- a/ext/psych/lib/psych/json/tree_builder.rb +++ b/ext/psych/lib/psych/json/tree_builder.rb @@ -13,7 +13,7 @@ module Psych end def start_mapping anchor, tag, implicit, style - super(anchor, tag, implicit, Nodes::Mapping::FLOW) + super(anchor, nil, implicit, Nodes::Mapping::FLOW) end def start_sequence anchor, tag, implicit, style diff --git a/test/psych/test_coder.rb b/test/psych/test_coder.rb index 0fa01ca3b6..c171c5ad0d 100644 --- a/test/psych/test_coder.rb +++ b/test/psych/test_coder.rb @@ -89,6 +89,10 @@ module Psych end end + def test_json_dump_exclude_tag + refute_match('TestCoder::InitApi', Psych.to_json(InitApi.new)) + end + def test_map_takes_block coder = Psych::Coder.new 'foo' tag = coder.tag diff --git a/version.h b/version.h index 2ae40d4d50..b830bd02f2 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 146 +#define RUBY_PATCHLEVEL 147 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1