Bug #2537
closed継承クラスにて、ブロック内にてsuperを呼ぶと、super called outside of method (NoMethodError)が発生する
Description
=begin
クラスを継承した先で、ブロック内からsuperを呼ぶと、super called outside of method (NoMethodError)が発生します。
ruby 1.8.7 (2009-06-12 patchlevel 174)では発生しません。
ruby 1.8.7 (2009-12-24 patchlevel 248)で確認しました。
添付のtest.rbで実行した結果
[root@localhost tmp]# ruby -v ; ruby /tmp/test.rb
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-linux]
"---- super class ----"
[root@localhost tmp]# ruby -v ; ruby /tmp/test.rb
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux]
/tmp/test.rb:17: super called outside of method (NoMethodError)
from /tmp/test.rb:3:in call' from /tmp/test.rb:3:in
test'
from /tmp/test.rb:16:in `aaa'
from /tmp/test.rb:22
[root@localhost tmp]#
=end
Files
Updated by naruse (Yui NARUSE) almost 15 years ago
- Status changed from Open to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
=begin
This is a bug from r25975 and nobu will fix this soon.
=end
Updated by nobu (Nobuyoshi Nakada) almost 15 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r26535.
Nobuhide, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end