From: Rodrigo Rosenfeld Rosas Date: 2011-06-07T20:19:25+09:00 Subject: [ruby-core:36816] Re: [Ruby 1.9 - Feature #4840][Open] Allow returning from require Em 07-06-2011 05:14, Haase, Konstantin escreveu: > How will that work with require? Remember it will only load the file once. Return false otherwise? (Which would be kinda compatible with the current behavior and using raise/throw). Or should those values be cached? If you want to use require CommonJS-style, it has to be cached. But what about return values that depend on or provoke side effects? Should files support early return? I was thinking about that yesterday, but I have no idea how this should work. If an aborted required should return true or false. Or a value defined by the return, like: return :aborted if should_abort? Or if require should accept some block as: require('some/file'){|return_value| do_something_with return_value } Really, I have no idea about this! Best regards, Rodrigo.