ruby-changes:22869
From: nobu <ko1@a...>
Date: Tue, 6 Mar 2012 11:43:35 +0900 (JST)
Subject: [ruby-changes:22869] nobu:r34918 (ruby_1_9_3): merge revision(s) 34908:
nobu 2012-03-06 11:43:21 +0900 (Tue, 06 Mar 2012) New Revision: 34918 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34918 Log: merge revision(s) 34908: * ext/syck/lib/syck/rubytypes.rb (Exception.yaml_new): fix bug that causes YAML serialization problem for Exception. Exception#initialize doesn't use visible instance variable for the exception message, so call the method with the message. patched by Jingwen Owen Ou <jingweno AT gmail.com>. http://github.com/ruby/ruby/pull/41 Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/ext/syck/lib/syck/rubytypes.rb branches/ruby_1_9_3/test/syck/test_exception.rb branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 34917) +++ ruby_1_9_3/ChangeLog (revision 34918) @@ -1,3 +1,12 @@ +Tue Mar 6 11:42:52 2012 Nobuyoshi Nakada <nobu@r...> + + * ext/syck/lib/syck/rubytypes.rb (Exception.yaml_new): fix bug + that causes YAML serialization problem for Exception. + Exception#initialize doesn't use visible instance variable for + the exception message, so call the method with the message. + patched by Jingwen Owen Ou <jingweno AT gmail.com>. + http://github.com/ruby/ruby/pull/41 + Fri Mar 2 22:09:03 2012 Hiroshi Nakamura <nahi@r...> * .travis.yml: Backport TravisCI configuration from trunk. Index: ruby_1_9_3/ext/syck/lib/syck/rubytypes.rb =================================================================== --- ruby_1_9_3/ext/syck/lib/syck/rubytypes.rb (revision 34917) +++ ruby_1_9_3/ext/syck/lib/syck/rubytypes.rb (revision 34918) @@ -122,7 +122,8 @@ class Exception yaml_as "tag:ruby.yaml.org,2002:exception" def Exception.yaml_new( klass, tag, val ) - o = YAML.object_maker( klass, { 'mesg' => val.delete( 'message' ) } ) + o = klass.allocate + Exception.instance_method(:initialize).bind(o).call(val.delete('message')) val.each_pair do |k,v| o.instance_variable_set("@#{k}", v) end Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 34917) +++ ruby_1_9_3/version.h (revision 34918) @@ -1,10 +1,10 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 155 +#define RUBY_PATCHLEVEL 156 -#define RUBY_RELEASE_DATE "2012-03-03" +#define RUBY_RELEASE_DATE "2012-03-06" #define RUBY_RELEASE_YEAR 2012 #define RUBY_RELEASE_MONTH 3 -#define RUBY_RELEASE_DAY 3 +#define RUBY_RELEASE_DAY 6 #include "ruby/version.h" Index: ruby_1_9_3/test/syck/test_exception.rb =================================================================== --- ruby_1_9_3/test/syck/test_exception.rb (revision 34917) +++ ruby_1_9_3/test/syck/test_exception.rb (revision 34918) @@ -13,7 +13,7 @@ end def setup - @wups = Wups.new + @wups = Wups.new('test_message') end def test_to_yaml -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/