"trans. (T. Onoma)" <transami / runbox.com> schrieb im Newsbeitrag news:200410121125.26956.transami / runbox.com... > Curious thought --- what if I'd like to know the arity of the proc being > executed? > > proc{|x| arity }.call(1) > > I see no way to do this, not even with the extended Binding class. Why do you need that? You *know* the arity because you define the argument list between ||. > I begin to > wonder (for this and other reasons) if a closure's "self" is doable? (at > least I think _closure_ is the right "scope" for this) No, it's not since self binds to the environment: class Foo def get() lambda { self } end end f = Foo.new x = f.get.call # x refers f Cheers robert