Project

General

Profile

Actions

Bug #2281

closed

Class#inherited Produces Misleading Error Message

Bug #2281: Class#inherited Produces Misleading Error Message

Added by runpaint (Run Paint Run Run) almost 16 years ago. Updated over 14 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.2dev (2009-10-25 trunk 25456) [i686-linux]
Backport:
[ruby-core:26333]

Description

=begin
$ cat -n /tmp/inherited.rb
1 def Object.inherited
2 end
3
4 class C
5 end
$ ruby -vw /tmp/inherited.rb
ruby 1.9.2dev (2009-10-25 trunk 25456) [i686-linux]
/tmp/inherited.rb:4:in `': wrong number of arguments (1 for 0) (ArgumentError)

If this scenario must raise an exception, could it report the line number of the inherited hook's definition and, preferably, the hook's name? It is undesirable for class definitions to be fatal. (I realise that this problem can be generalised to other callbacks).
=end

Updated by matz (Yukihiro Matsumoto) almost 16 years ago Actions #1

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r25521.
Run Paint, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Updated by ko1 (Koichi Sasada) over 15 years ago Actions #2

  • Status changed from Closed to Open
  • Assignee set to ko1 (Koichi Sasada)
  • Target version set to 1.9.2

=begin
r25521 was reverted.
=end

Updated by ko1 (Koichi Sasada) over 15 years ago Actions #3

  • Status changed from Open to Closed

=begin
This issue was solved with changeset r27609.
Run Paint, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: PDF Atom