Bug #1018

return in an eigenclass definition

Added by Shugo Maeda almost 7 years ago. Updated over 4 years ago.

Assignee:Koichi Sasada
ruby -v:ruby 1.9.2dev (2010-01-14 trunk 26325) [i386-mingw32] Backport:



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]


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


#1 Updated by _ wanabe almost 6 years ago

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

#2 Updated by Yusuke Endoh over 5 years ago

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

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.


Also available in: Atom PDF