ruby-changes:32287
From: nagachika <ko1@a...>
Date: Mon, 23 Dec 2013 22:57:38 +0900 (JST)
Subject: [ruby-changes:32287] nagachika:r44366 (ruby_2_0_0): merge revision(s) 44198: [Backport #9236]
nagachika 2013-12-23 22:57:30 +0900 (Mon, 23 Dec 2013) New Revision: 44366 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44366 Log: merge revision(s) 44198: [Backport #9236] * proc.c (mnew_from_me): method by respond_to_missing? should be owned by the original class. Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/proc.c branches/ruby_2_0_0/test/ruby/test_method.rb branches/ruby_2_0_0/version.h Index: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 44365) +++ ruby_2_0_0/ChangeLog (revision 44366) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Mon Dec 23 22:37:01 2013 Nobuyoshi Nakada <nobu@r...> + + * proc.c (mnew_from_me): method by respond_to_missing? should be + owned by the original class. + Sun Dec 22 22:56:06 2013 Nobuyoshi Nakada <nobu@r...> * proc.c (mnew_from_me): achieve the original defined_class from Index: ruby_2_0_0/proc.c =================================================================== --- ruby_2_0_0/proc.c (revision 44365) +++ ruby_2_0_0/proc.c (revision 44366) @@ -955,6 +955,7 @@ mnew(VALUE klass, VALUE obj, ID id, VALU https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/proc.c#L955 def->type = VM_METHOD_TYPE_MISSING; def->original_id = id; def->alias_count = 0; + defined_class = klass; meb.flag = 0; meb.mark = 0; Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 44365) +++ ruby_2_0_0/version.h (revision 44366) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" -#define RUBY_RELEASE_DATE "2013-12-22" -#define RUBY_PATCHLEVEL 371 +#define RUBY_RELEASE_DATE "2013-12-23" +#define RUBY_PATCHLEVEL 372 #define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_MONTH 12 -#define RUBY_RELEASE_DAY 22 +#define RUBY_RELEASE_DAY 23 #include "ruby/version.h" Index: ruby_2_0_0/test/ruby/test_method.rb =================================================================== --- ruby_2_0_0/test/ruby/test_method.rb (revision 44365) +++ ruby_2_0_0/test/ruby/test_method.rb (revision 44366) @@ -189,6 +189,17 @@ class TestMethod < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_method.rb#L189 assert_equal(c, c2.instance_method(:foo).owner) end + def test_owner_missing + c = Class.new do + def respond_to_missing?(name, bool) + name == :foo + end + end + c2 = Class.new(c) + assert_equal(c, c.new.method(:foo).owner) + assert_equal(c2, c2.new.method(:foo).owner) + end + def test_receiver_name_owner o = Object.new def o.foo; end Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r44198 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/