diff options
| author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-08 16:55:30 +0000 |
|---|---|---|
| committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-08 16:55:30 +0000 |
| commit | 9c197735be45e94090650e1c19aa77f95c43a0e3 (patch) | |
| tree | 12204830a8a3d606b5ef8b1e0ee566d2cf067610 | |
| parent | 7c3869368c52ea597ebe11c170f886302ddef75f (diff) | |
* 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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -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 <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] + Fri Nov 6 17:13:45 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * 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)) |
