Bug #1018

return in an eigenclass definition

Added by Shugo Maeda over 6 years ago. Updated about 4 years ago.

[ruby-core:21379]
Status:Closed
Priority:Normal
Assignee:Koichi Sasada
ruby -v:ruby 1.9.2dev (2010-01-14 trunk 26325) [i386-mingw32] Backport:

Description

=begin
Hi,

return in an eigenclass definition causes compile error on Ruby 1.9.

$ cat /tmp/t.rb
class Object
def eigenclass
class <

It's a bug, isn't it?

FYI, It seems that the program execution is terminated on JRuby.

$ jruby -v /tmp/t.rb
jruby 1.1.6 (ruby 1.8.6 patchlevel 114) (2008-12-17 rev 8388) [i386-java]
$

Shugo
=end

return_from_eclass.patch Magnifier (1.07 KB) _ wanabe, 01/15/2010 12:28 AM


Related issues

Related to Ruby trunk - Bug #2776: can't return from lambda with outer block Rejected 02/22/2010
Related to Ruby trunk - Bug #3141: yield in an eigenclass definition Closed 04/13/2010

History

#1 Updated by _ wanabe over 5 years ago

=begin
When TAG_RETURN is thrown, how about updating lfp after pass ISEQ_TYPE_CLASS?
=end

#2 Updated by Yusuke Endoh about 5 years ago

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

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

=end

Also available in: Atom PDF