Project

General

Profile

Bug #2537

継承クラスにて、ブロック内にてsuperを呼ぶと、super called outside of method (NoMethodError)が発生する

Added by bon (Nobuhide Nakabo) over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux]
[ruby-dev:39931]

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

test.rb (213 Bytes) test.rb bon (Nobuhide Nakabo), 12/28/2009 01:24 PM

Related issues

Has duplicate Ruby 1.8 - Bug #2600: block.callの中でsuperできないClosedActions

History

#1

Updated by naruse (Yui NARUSE) over 9 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

#2

Updated by nobu (Nobuyoshi Nakada) over 9 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

Also available in: Atom PDF