diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | eval.c | 8 | ||||
-rw-r--r-- | test/runner.rb | 4 |
3 files changed, 12 insertions, 6 deletions
@@ -1,3 +1,9 @@ +Mon Nov 9 01:55:10 2009 Marc-Andre Lafortune <[email protected]> + + * 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] + Fri Nov 6 17:13:45 2009 Nobuyoshi Nakada <[email protected]> * lib/mkmf.rb (create_header): split the line by tabs. @@ -9390,8 +9390,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) { @@ -9532,7 +9532,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)); } /* @@ -9959,7 +9959,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)) |