ブロックに対するブロック引数の扱いについて

e$B%o%J%Y$H?=$7$^$9!#e(B

1.9e$B$G$O!"%V%m%C%/$N0z?t$K%V%m%C%/0z?t$r4^$a$k$3$H$,$G$-$k$h$&$G$9$,e(B
e$B%V%m%C%/$r<u$1<h$C$?>l9g$K$be(B block_given? e$B$O56$G$"$je(B
e$B$^$?e(B yield e$B$b$G$-$J$$>uBV$K$J$C$F$$$^$9!#e(B
e$B$"$^$jD>46E*$G$J$$$h$&$K;W$$$^$9$,!"$3$l$O0U?^$5$l$?F0:n$J$N$G$7$g$&$+!#e(B
e$B0U?^E*$G$"$k$H$7$?$i$=$NM}M3$r!"e(B
e$B$=$&$G$J$$$H$7$?$iA[Dj$5$l$F$$$kF0:n$r$*J9$-$7$?$$$G$9!#e(B

e$B$9$G$K$I$3$+$K$"$k>[email protected]$C$?$i?=$7Lu$"$j$^$;$s!#e(B

$ ruby -ve
a = proc {|&b|
p b
p block_given?
yield
}
a.call {}

ruby 1.9.0 (2008-04-06 revision 15910) [i386-mingw32]
#Proc:[email protected]:7
false
-e:5:in block in <main>': no block given (yield) (LocalJumpError) from -e:7:incall
from -e:7:in `

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

At Wed, 9 Apr 2008 19:23:23 +0900,
wanabe wrote in [ruby-dev:34274]:

1.9e$B$G$O!"%V%m%C%/$N0z?t$K%V%m%C%/0z?t$r4^$a$k$3$H$,$G$-$k$h$&$G$9$,e(B
e$B%V%m%C%/$r<u$1<h$C$?>l9g$K$be(B block_given? e$B$O56$G$"$je(B
e$B$^$?e(B yield e$B$b$G$-$J$$>uBV$K$J$C$F$$$^$9!#e(B
e$B$"$^$jD>46E*$G$J$$$h$&$K;W$$$^$9$,!"$3$l$O0U?^$5$l$?F0:n$J$N$G$7$g$&$+!#e(B

e$B%P%0$G$9!#e(B

e$B$9$G$K$I$3$+$K$"$k>[email protected]$C$?$i?=$7Lu$"$j$^$;$s!#e(B

bootstraptest/test_knownbuge$B$H$+!#e(B

e$B%o%J%Y$G$9!#e(B

08/04/10 e$B$Ke(B Nobuyoshi N.[email protected]
e$B$5$s$O=q$-$^$7$?e(B:

e$B%P%0$G$9!#e(B

e$B$9$G$K$I$3$+$K$"$k>[email protected]$C$?$i?=$7Lu$"$j$^$;$s!#e(B

bootstraptest/test_knownbuge$B$H$+!#e(B

e$B$"$"$9$_$^$;$s!"$b$A$m$s$=$A$i$O8+$?$s$G$9$,e(B
e$B$=$b$=$b%V%m%C%/$K%V%m%C%/0z?t$,EO$9$3$H$,4q0[$K;W$($?$N$Ge(B
e$B$=$A$i$NJ}$,2?$+$NI{:nMQ$J$N$+$J!"$H;W$$$^$7$?!#e(B
knownbug e$B$NNc$,e(Bdefine_method
[email protected]$C$?;v$r9M$($k$H<[email protected]$G$7$?!#$*CQ$:$+$7$$8B$j$G$9!#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