summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-06 02:43:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-06 02:43:21 +0000
commit0496299e1597826a1ae60bb0f1f997baa12a0743 (patch)
tree5c8eccdf311bd7349cfac3299debda8fa309cc34
parent34fca5d70298d81e49c29925b3a5c4888300b6ae (diff)
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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--ext/syck/lib/syck/rubytypes.rb3
-rw-r--r--test/syck/test_exception.rb2
-rw-r--r--version.h6
4 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a0faf7714..426a6540d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Tue Mar 6 11:42:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* .travis.yml: Backport TravisCI configuration from trunk.
diff --git a/ext/syck/lib/syck/rubytypes.rb b/ext/syck/lib/syck/rubytypes.rb
index eeef156e27..b6869c4b8b 100644
--- a/ext/syck/lib/syck/rubytypes.rb
+++ b/ext/syck/lib/syck/rubytypes.rb
@@ -122,7 +122,8 @@ end
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
diff --git a/test/syck/test_exception.rb b/test/syck/test_exception.rb
index b85cabcd6b..b8ac14e293 100644
--- a/test/syck/test_exception.rb
+++ b/test/syck/test_exception.rb
@@ -13,7 +13,7 @@ module Syck
end
def setup
- @wups = Wups.new
+ @wups = Wups.new('test_message')
end
def test_to_yaml
diff --git a/version.h b/version.h
index 09f44f99b2..3ac5eee7e8 100644
--- a/version.h
+++ b/version.h
@@ -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"