ruby-changes:23889
From: shyouhei <ko1@a...>
Date: Wed, 6 Jun 2012 14:35:03 +0900 (JST)
Subject: [ruby-changes:23889] shyouhei:r35940 (ruby_1_8_7): @nobu you must run make test-all _before_ you check in.
shyouhei 2012-06-06 14:34:55 +0900 (Wed, 06 Jun 2012) New Revision: 35940 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35940 Log: @nobu you must run make test-all _before_ you check in. reverting revision r34920 because it fails. Removed files: branches/ruby_1_8_7/test/yaml/test_exception.rb Modified files: branches/ruby_1_8_7/lib/yaml/rubytypes.rb branches/ruby_1_8_7/version.h Index: ruby_1_8_7/version.h =================================================================== --- ruby_1_8_7/version.h (revision 35939) +++ ruby_1_8_7/version.h (revision 35940) @@ -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 Index: ruby_1_8_7/lib/yaml/rubytypes.rb =================================================================== --- ruby_1_8_7/lib/yaml/rubytypes.rb (revision 35939) +++ ruby_1_8_7/lib/yaml/rubytypes.rb (revision 35940) @@ -117,8 +117,7 @@ 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 Index: ruby_1_8_7/test/yaml/test_exception.rb =================================================================== --- ruby_1_8_7/test/yaml/test_exception.rb (revision 35939) +++ ruby_1_8_7/test/yaml/test_exception.rb (revision 35940) @@ -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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/