summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--eval.c8
-rw-r--r--test/runner.rb4
-rw-r--r--version.h2
4 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 75fd658d92..f6387434ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Dec 14 03:36:20 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * eval.c (method_inspect, method_name, mnew): Bug fix when
+ method created from an alias.
+ Based on a patch by Peter Vanbroekhoven [ruby-core:22040]
+
Mon Dec 14 03:21:59 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (call_trace_func): remove the trace hook if any exception
diff --git a/eval.c b/eval.c
index 24267b033e..c11b96fe37 100644
--- a/eval.c
+++ b/eval.c
@@ -9273,8 +9273,8 @@ mnew(klass, obj, id, mklass)
ID oid = id;
again:
- if ((body = rb_get_method_body(&klass, &id, &noex)) == 0) {
- print_undef(rklass, oid);
+ if ((body = rb_get_method_body(&klass, &oid, &noex)) == 0) {
+ print_undef(rklass, id);
}
if (nd_type(body) == NODE_ZSUPER) {
@@ -9415,7 +9415,7 @@ method_name(obj)
struct METHOD *data;
Data_Get_Struct(obj, struct METHOD, data);
- return rb_str_new2(rb_id2name(data->oid));
+ return rb_str_new2(rb_id2name(data->id));
}
/*
@@ -9841,7 +9841,7 @@ method_inspect(method)
}
}
rb_str_buf_cat2(str, sharp);
- rb_str_buf_cat2(str, rb_id2name(data->oid));
+ rb_str_buf_cat2(str, rb_id2name(data->id));
rb_str_buf_cat2(str, ">");
return str;
diff --git a/test/runner.rb b/test/runner.rb
index d274bc8929..767947b7f2 100644
--- a/test/runner.rb
+++ b/test/runner.rb
@@ -1,7 +1,7 @@
require 'test/unit'
rcsid = %w$Id$
-Version = rcsid[2].scan(/\d+/).collect!(&method(:Integer)).freeze
-Release = rcsid[3].freeze
+Version = rcsid[2].scan(/\d+/).collect!(&method(:Integer)).freeze rescue nil
+Release = rcsid[3].freeze rescue nil
exit Test::Unit::AutoRunner.run(true, File.dirname($0))
diff --git a/version.h b/version.h
index 23fbc0dd04..7ccef14146 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2009-12-14"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20091214
-#define RUBY_PATCHLEVEL 229
+#define RUBY_PATCHLEVEL 230
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8