Defined? a &&= 0

e$B0J2<$N$h$&$K!“e(Bdefined? a &&= 0 e$B$,e(B nil
e$B$K$J$j$^$9$,!”$3$l$O0Ue(B
e$B?^E*$G$7$g$&$+e(B?

% ./ruby -ve ‘p(defined? a &&= 0)’
ruby 1.9.0 (2008-05-02 revision 16284) [i686-linux]
nil

1.8 e$B$G$Oe(B “expression” e$B$G$7$?!#e(B

% ruby-1.8 -ve ‘p(defined? a &&= 0)’
ruby 1.8.7 (2008-05-02 patchlevel 5000) [i686-linux]
“expression”

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

2008/05/04 17:05 Tanaka A. [email protected]:

e$B0J2<$N$h$&$K!“e(Bdefined? a &&= 0 e$B$,e(B nil e$B$K$J$j$^$9$,!”$3$l$O0Ue(B
e$B?^E*$G$7$g$&$+e(B?

e$BNc30$,5/$-$J$$8B$je(B “expression”
e$B$rJV$9$h$&$K$9$k%Q%C%A$r=q$-$^$7$?!#e(B
catch e$B%F!<%V%k$Ne(B sp e$B$N7W;;>e!“L58z$Je(B branchif
e$B$r$O$5$s$G$”$j$^$9!#e(B
[email protected]$7$/$O$I$&=q$/$N$,$h$$$N$G$7$g$&$+!#e(B

e$B$H$3$m$Ge(B 1.8/1.9 e$B6&DL$NF0:n$G!“e(Ba e$B$,L$Dj5A$N$H$-$Ke(B
defined?(a||=0) e$B$H$9$k$He(B
a == 0 e$B$K$J$k$N$G$9$,!”[email protected]$7$$F0:n$J$N$G$7$g$&$+!#e(B

Index: compile.c

— compile.c (revision 16303)
+++ compile.c (working copy)
@@ -2499,7 +2499,9 @@
if (!lfinish[1]) {
lfinish[1] = NEW_LABEL(nd_line(node));
}

  • ADD_INSNL(ret, nd_line(node), branchunless, lfinish[1]);
  • ADD_INSN(ret, nd_line(node), pop);
  • ADD_INSN(ret, nd_line(node), putnil);
  • ADD_INSNL(ret, nd_line(node), branchif, lfinish[1]);
    if (needstr) {
    ADD_INSN1(ret, nd_line(node), putstring,
    rb_str_new2(“expression”));
    }

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

wanabe wrote:

e$BNc30$,5/$-$J$$8B$je(B “expression” e$B$rJV$9$h$&$K$9$k%Q%C%A$r=q$-$^$7$?!#e(B

e$B!!$9$_$^$;$s!$;d$,;EMM$r4*0c$$$7$F$$$?$h$&$G$9!%$D$^$j!$<0$NCM$,56e(B
[email protected]$C$?>l9g!$e(Bnil [email protected]$H;W$C$F$$$^$7$?!%e(B

catch e$B%F!<%V%k$Ne(B sp e$B$N7W;;>e!“L58z$Je(B branchif e$B$r$O$5$s$G$”$j$^$9!#e(B
[email protected]$7$/$O$I$&=q$/$N$,$h$$$N$G$7$g$&$+!#e(B

e$B!!$3$N$"$?$j!$>lEv$?$jE*$Je(B sp
e$B$N7W;;J}<0$,$^$:$$$h$&$G$9!JD>$C$F$J$$e(B
e$B%P%0$Ne(B1e$B$D!K!%e(B

e$B!!e(Biseq e$B:[email protected];~$K$O!$e(Barray e$B$8$c$J$/$Fe(B tree
e$B$K$7$F!$e(Bsp e$B$r7W;;$9$k$7$+$Je(B
e$B$$$+$H9M$($F$$$k$H$3$m$G$9!%$b$C$H$$$$J}K!$,$"$k$+$b$7$l$J$$$s$G$9$,!%e(B

e$B!!$H$j$"$($:[email protected]$-$^$7$?%Q%C%[email protected]$/$N$,$$$$$N$G$O$J$$e(B
e$B$+$H;W$$$^$9!%$7$+$7!$Nc30$r=P$9e(B test e$B$,[email protected]$J!%e(B

e$B$H$3$m$Ge(B 1.8/1.9 e$B6&DL$NF0:n$G!“e(Ba e$B$,L$Dj5A$N$H$-$Ke(B defined?(a||=0) e$B$H$9$k$He(B
a == 0 e$B$K$J$k$N$G$9$,!”[email protected]$7$$F0:n$J$N$G$7$g$&$+!#e(B

e$B!!$3$3$O$I$&$J$s$G$7$g$&!%e(B

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

In message “Re: [ruby-dev:34645] Re: defined? a &&= 0”
on Sun, 11 May 2008 15:06:11 +0900, wanabe [email protected]
writes:

|e$B$H$3$m$Ge(B 1.8/1.9 e$B6&DL$NF0:n$G!“e(Ba e$B$,L$Dj5A$N$H$-$Ke(B defined?(a||=0) e$B$H$9$k$He(B
|a == 0 e$B$K$J$k$N$G$9$,!”[email protected]$7$$F0:n$J$N$G$7$g$&$+!#e(B

defined?e$B$KBeF~$,$"$k$H%m!<%+%kJQ?t$rDj5A$[email protected]$H$O;W$C$F$$e(B
e$B$^$7$?$,!"<B:]$KBeF~$9$Y$-$H$^$G$O;W$C$F$$$^$;$s$G$7$?!#$H$$e(B
e$B$&$o$1$G%P%[email protected]$H;W$$$^$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