summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-26 20:50:32 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-26 20:50:32 +0000
commit3312f4246af871f9148ca929901dcf3d989a752b (patch)
tree0bade3af0a968bffc401314e54a2fab87882002f
parent954bcdab802417b911573a9d1746eef395e2ba12 (diff)
* eval.c (mnew): call of super via a method object should work again.
[ruby-talk:248647], Thanks Calamitas. * test/ruby/test_method.rb (TestMethod::test_method_super): test for above fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@12393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--eval.c1
-rw-r--r--test/ruby/test_method.rb11
-rw-r--r--version.h6
4 files changed, 22 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 009fcd00585..20aa0b59762 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sun May 27 05:52:37 2007 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * eval.c (mnew): call of super via a method object should work again.
+ [ruby-talk:248647], Thanks Calamitas.
+
+ * test/ruby/test_method.rb (TestMethod::test_method_super): test for
+ above fix.
+
Wed May 23 06:51:46 2007 URABE Shyouhei <shyouhei@ruby-lang.org>
* lib/cgi.rb (CGI#[]): get rid of exceptions being raised.
diff --git a/eval.c b/eval.c
index 0ea279caee2..5a1a7ed75e9 100644
--- a/eval.c
+++ b/eval.c
@@ -8903,7 +8903,6 @@ mnew(klass, obj, id, mklass)
(FL_TEST(rklass, FL_SINGLETON) || TYPE(rklass) == T_ICLASS)) {
rklass = RCLASS(rklass)->super;
}
- if (TYPE(klass) == T_ICLASS) klass = RBASIC(klass)->klass;
method = Data_Make_Struct(mklass, struct METHOD, bm_mark, free, data);
data->klass = klass;
data->recv = obj;
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index c30705cb15e..ef28098dce5 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -11,8 +11,13 @@ class TestMethod < Test::Unit::TestCase
class Base
def foo() :base end
+ def bar() :bar end
+ end
+ module SuperBar
+ def bar() super end
end
class Derived < Base
+ include SuperBar
def foo() :derived end
end
@@ -39,4 +44,10 @@ class TestMethod < Test::Unit::TestCase
um.bind(Base.new)
end
end
+
+ def test_method_super
+ assert_nothing_raised do
+ assert_equal(:bar, Derived.new.method(:bar).call)
+ end
+ end
end
diff --git a/version.h b/version.h
index bb15557fd88..d7f27fa5dfc 100644
--- a/version.h
+++ b/version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.5"
#define RUBY_RELEASE_DATE "2007-05-23"
#define RUBY_VERSION_CODE 185
-#define RUBY_RELEASE_CODE 20070523
-#define RUBY_PATCHLEVEL 49
+#define RUBY_RELEASE_CODE 20070527
+#define RUBY_PATCHLEVEL 50
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 5
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 5
-#define RUBY_RELEASE_DAY 23
+#define RUBY_RELEASE_DAY 27
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];