Actions
Bug #1018
closedreturn in an eigenclass definition
Description
=begin
Hi,
return in an eigenclass definition causes compile error on Ruby 1.9.
$ cat /tmp/t.rb
class Object
def eigenclass
class <<self
return self
end
end
end
p Object.eigenclass
$ ruby-trunk -v /tmp/t.rb
ruby 1.9.0 (2008-11-25 revision 20352) [i686-linux]
/tmp/t.rb:4: Invalid return
/tmp/t.rb: compile error (SyntaxError)
$ ruby-1_8 -v /tmp/t.rb
ruby 1.8.7 (2009-01-14 revision 21505) [i686-linux]
#Class:Object
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
Files
Actions
Like0
Like0Like0