Block parameter is always block local

[email protected]$G$9!#e(B

e$B!!e(Bruby 1.9.0 (2006-11-03) [x86_64-linux]
e$B$K$*$$$F!"%V%m%C%/%Q%i%a!<%?$Oe(B
e$BI,$:%V%m%C%/%m!<%+%k$K$J$C$F$$$k$h$&$J5$$,$7$^$9!#e(B

  def iter
    yield 10
  end

  a = nil
  iter{|a|
    p a #=> 10
  }
  p a #=> nil

e$B!!JQ99$K5$$E$+$J$+$C$?$s$G$9$,!"$3$l$+$i$O$3$s$J46$8$G$7$g$&$+!#e(B

e$B!!%V%m%C%/%Q%i%a!<%?@k8@<0$K!“BeF~<01&JU$K$J$k$3$H$,=PMh$k$b$N$9$Y$F$rMFe(B
e$BG’$9$k$H$$$&;EMM$b$D$$$KL5$/$J$C$?$N$G!”[email protected]$$$V%7%s%W%k$K$J$j$^$7$?$M!#e(B

e$B$,!"$=$l$rBP1~$9$k$?$a$K$$$m$$$m4hD%$C$??H$H$7$F$O$A$g$C$H$5$S$7$$!#e(B

[email protected]$G$9!#e(B

SASADA Koichi wrote:

e$B!!%V%m%C%/%Q%i%a!<%?@k8@<0$K!“BeF~<01&JU$K$J$k$3$H$,=PMh$k$b$N$9$Y$F$rMFe(B
e$BG’$9$k$H$$$&;EMM$b$D$$$KL5$/$J$C$?$N$G!”[email protected]$$$V%7%s%W%k$K$J$j$^$7$?$M!#e(B

e$B!!$9$_$^$;$s!":8JU$G$7$?!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:29861] block parameter is always block local”
on Mon, 6 Nov 2006 14:44:22 +0900, SASADA Koichi [email protected]
writes:

|e$B!!e(Bruby 1.9.0 (2006-11-03) [x86_64-linux] e$B$K$*$$$F!"%V%m%C%/%Q%i%a!<%?$Oe(B
|e$BI,$:%V%m%C%/%m!<%+%k$K$J$C$F$$$k$h$&$J5$$,$7$^$9!#e(B

|e$B!!JQ99$K5$$E$+$J$+$C$?$s$G$9$,!"$3$l$+$i$O$3$s$J46$8$G$7$g$&$+!#e(B

e$B$3$l$+$i$O$3$s$J46$8$G$9!#e(B

|e$B!!%V%m%C%/%Q%i%a!<%?@k8@<0$K!“BeF~<01&JU$K$J$k$3$H$,=PMh$k$b$N$9$Y$F$rMFe(B
|e$BG’$9$k$H$$$&;EMM$b$D$$$KL5$/$J$C$?$N$G!”[email protected]$$$V%7%s%W%k$K$J$j$^$7$?$M!#e(B
|
|# e$B$,!"$=$l$rBP1~$9$k$?$a$K$$$m$$$m4hD%$C$??H$H$7$F$O$A$g$C$H$5$S$7$$!#e(B

e$B$9$_$^$;$s!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs