Class#inherited Produces Misleading Error Message
$ cat -n /tmp/inherited.rb
1 def Object.inherited
4 class C
$ 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).
Updated by matz (Yukihiro Matsumoto) over 12 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
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.