ruby-changes:14643
From: yugui <ko1@a...>
Date: Sat, 30 Jan 2010 21:48:33 +0900 (JST)
Subject: [ruby-changes:14643] Ruby:r26488 (ruby_1_9_1): merges r25360 from trunk into ruby_1_9_1.
yugui 2010-01-30 21:48:19 +0900 (Sat, 30 Jan 2010) New Revision: 26488 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26488 Log: merges r25360 from trunk into ruby_1_9_1. -- * test/ruby/test_object.rb (test_remove_method): test for Bug#2202. Modified files: branches/ruby_1_9_1/test/ruby/test_object.rb branches/ruby_1_9_1/version.h Index: ruby_1_9_1/version.h =================================================================== --- ruby_1_9_1/version.h (revision 26487) +++ ruby_1_9_1/version.h (revision 26488) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.1" -#define RUBY_PATCHLEVEL 393 +#define RUBY_PATCHLEVEL 394 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_1/test/ruby/test_object.rb =================================================================== --- ruby_1_9_1/test/ruby/test_object.rb (revision 26487) +++ ruby_1_9_1/test/ruby/test_object.rb (revision 26488) @@ -265,6 +265,26 @@ c.instance_eval { remove_method(:foo) } end + c = Class.new do + def meth1; "meth" end + end + d = Class.new(c) do + alias meth2 meth1 + end + o1 = c.new + assert_respond_to(o1, :meth1) + assert_equal("meth", o1.meth1) + o2 = d.new + assert_respond_to(o2, :meth1) + assert_equal("meth", o2.meth1) + assert_respond_to(o2, :meth2) + assert_equal("meth", o2.meth2) + d.class_eval do + remove_method :meth2 + end + bug2202 = '[ruby-core:26074]' + assert_raise(NoMethodError, bug2202) {o2.meth2} + %w(object_id __send__ initialize).each do |m| assert_in_out_err([], <<-INPUT, %w(:ok), /warning: removing `#{m}' may cause serious problem$/) $VERBOSE = false -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/