Project

General

Profile

Actions

Bug #2537

closed

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

Added by bon (Nobuhide Nakabo) over 14 years ago. Updated almost 13 years ago.

Status:
Closed
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 1 (0 open1 closed)

Has duplicate Ruby 1.8 - Bug #2600: block.callの中でsuperできないClosednobu (Nobuyoshi Nakada)Actions
Actions #1

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

Actions #2

Updated by nobu (Nobuyoshi Nakada) about 14 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

Actions

Also available in: Atom PDF

Like0
Like0Like0