Issue #4840 has been updated by mame (Yusuke Endoh).


Anyone create a patch conformed to the spec written in [ruby-core:46648]?

I guess that my experimental patch ([ruby-core:36811]) is not confirmed completely;
perhaps it allows "return from class definition" (but I didn't tested yet).

-- 
Yusuke Endoh <mame / tsg.ne.jp>
----------------------------------------
Feature #4840: Allow returning from require
https://bugs.ruby-lang.org/issues/4840#change-33797

Author: rosenfeld (Rodrigo Rosenfeld Rosas)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: 
Target version: 2.0.0


I have a situation where there is some code in Gitorious like:

unless defined? GitoriousConfig
  # tons of lines here
end

And I would it to look like

return if defined? GitoriousConfig

#tons of lines here

It would be great to allow return from a required file or some other keyword (break, etc or a new one)


-- 
http://bugs.ruby-lang.org/