The proposed new rule is that a variable introduced in a block (other than
the block parameters) is not local to the block but the enclosing scope.
So in effect you can do then:

def summer(*args)
  args.each { |arg| sum += arg.to_i }
  sum
end

Today you have to write

def summer(*args)
  sum = 0
  args.each { |arg| sum += arg.to_i }
  sum
end

    robert


"Michael Campbell" <michael_s_campbell / yahoo.com> schrieb im Newsbeitrag
news:20030204142005.32046.qmail / web12408.mail.yahoo.com...
> > > And while we have mentioned the new scoping rules, I think the
> > > new rules are fine.
>
> Can someone list a synopsis of the new rules (or have I missed that?)
>  This thread got to be wayyyy too long to follow for me with all the
> points and counterpoints.
>
> =====
> --
>
> Yahoo IM: michael_s_campbell
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>