summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-06 05:34:55 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-06 05:34:55 +0000
commit996e9cf4e9c78c4bf8fdbf937f3984e0b2eb6e40 (patch)
treee5ceccb8ecab5a2641fb9f3435e3b3bc1774d0c4
parent69883b3ee6502cc210e598fd440b65e20629cd9c (diff)
@nobu you must run make test-all _before_ you check in.
reverting revision r34920 because it fails. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@35940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/yaml/rubytypes.rb3
-rw-r--r--test/yaml/test_exception.rb52
-rw-r--r--version.h2
3 files changed, 2 insertions, 55 deletions
diff --git a/lib/yaml/rubytypes.rb b/lib/yaml/rubytypes.rb
index 55d59fa03b..35b719196e 100644
--- a/lib/yaml/rubytypes.rb
+++ b/lib/yaml/rubytypes.rb
@@ -117,8 +117,7 @@ end
class Exception
yaml_as "tag:ruby.yaml.org,2002:exception"
def Exception.yaml_new( klass, tag, val )
- o = klass.allocate
- Exception.instance_method(:initialize).bind(o).call(val.delete('message'))
+ o = YAML.object_maker( klass, { 'mesg' => val.delete( 'message' ) } )
val.each_pair do |k,v|
o.instance_variable_set("@#{k}", v)
end
diff --git a/test/yaml/test_exception.rb b/test/yaml/test_exception.rb
deleted file mode 100644
index 1dc3044a94..0000000000
--- a/test/yaml/test_exception.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-require 'test/unit'
-require 'yaml'
-
-module Syck
- class TestException < Test::Unit::TestCase
- class Wups < Exception
- attr_reader :foo, :bar
- def initialize *args
- super
- @foo = 1
- @bar = 2
- end
-
- def ==(other)
- self.class == other.class and
- self.message == other.message and
- self.backtrace == other.backtrace
- end
- end
-
- def setup
- @wups = Wups.new('test_message')
- end
-
- def test_to_yaml
- w = YAML.load(@wups.to_yaml)
- assert_equal @wups, w
- assert_equal 1, w.foo
- assert_equal 2, w.bar
- end
-
- def test_dump
- w = YAML.load(@wups.to_yaml)
- assert_equal @wups, w
- assert_equal 1, w.foo
- assert_equal 2, w.bar
- end
-
- def test_to_yaml_properties
- class << @wups
- def to_yaml_properties
- [:@foo]
- end
- end
-
- w = YAML.load(YAML.dump(@wups))
- assert_equal @wups, w
- assert_equal 1, w.foo
- assert_nil w.bar
- end
- end
-end
diff --git a/version.h b/version.h
index d084c57002..3b58c4e3c8 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2012-06-06"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20120606
-#define RUBY_PATCHLEVEL 363
+#define RUBY_PATCHLEVEL 364
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8