Skip to content

configure: Why not just `yield` instead of `yield self`? #545

mattdipasquale opened this Issue Jul 1, 2012 · 3 comments

3 participants


In all examples I've seen, the block passed to Base#configure doesn't take any arguments. Why pass self as an argument?

canton7 commented Jul 1, 2012

See, in particular the second to last line.


Hmm... But, wouldn't self inside the block passed to configure { |c| ... } be equal to c? If not, what is self inside that block?

Perhaps an example would help me understand when it makes sense to pass a block with an argument to configure.

Sinatra member
rkh commented Aug 31, 2012

No, only in modular apps, in classic apps some methods are just delegated. I agree that there is hardly a use case now, but it would break old apps (register used to not be delegated).

@rkh rkh closed this Aug 31, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.