> |My question was about variable n, the block does not necessarly introduces > |a fresh variable, instead it (possibly) binds it to an already existing > |variable. IMHO this treatement of variables occurring as argument of > |blocks is unrelated to the creation of closures. > > It is necessary. For example > > fact = proc{|n| > n == 0 ? 1 : fact.call(n-1)*n > } > p fact.call(4) > > would return 0 if the block does not introduce a new scope. I agree, this is the right way. But again my question is different (see original posting). What I do not understand is the following: a = 1; x =1 f = proc {|a| a += 1} f.call(x) a # results 2 Why a in proc is bound to the external a? Why the brackets do NOT introduce a new scope when a var with same name exists?