e$B$k$S$-$A$G$9!#e(B
e$B7Y9p!Ve(Bshadowing outer local
variablee$B!W$O$J$/$9$Y$-$@$H;W$$$^$9!#e(B
e$B$=$b$=$b860x$Oe(B1.8e$B$^$G$N%V%m%C%/0z?t$N;EMM$,$R$I$+$C$?$+$i$G$9!#e(B
e$B7Y9p$r>C$9$K$Oe(B1.8e$B$^$GF1MM$?$H$(e(B1e$BJ8$N%V%m%C%/$G$"$C$F$be(B
e$B%V%m%C%/0z?t$NL>A0$rJQ99$7$J$$$H$$$1$J$/$J$j$^$9!#e(B
e$B$3$l$O$+$J$j%9%H%l%9$,$?$^$j$^$9!#e(B
e$BA1$70-$7$OJL$H$7$FF1$8JQ?tL>$r;H$&$N$Oe(BLispe$B$d#C8@8l$G$bIaDL$K9T$o$l$F$$$^$9!#e(B
e$B$`$7$m$3$N7Y9p$Oe(B1.8e$B$K$D$1$k$Y$-$G$9!#e(B
RUBY_VERSION # => “1.9.0”
RUBY_RELEASE_DATE # => “2008-02-20”
a = 1
b = [1,2].map{|a| a*2} # => [2, 4] # !> shadowing outer local
variable - a
(let ((a 1) b)
(setq b (mapcar (lambda (a) (* a 2)) '(1 2)))
(list a b)) ; => (1 (2 4))
diff -u /home/nobackup/compile/ruby19/parse.c.orig
/home/nobackup/compile/ruby19/parse.c
— /home/nobackup/compile/ruby19/parse.c.orig 2008-02-22
00:43:34.000000000 +0900
+++ /home/nobackup/compile/ruby19/parse.c 2008-02-22 00:42:47.000000000
+0900
@@ -12790,7 +12790,6 @@
yyerror(“duplicated argument name”);
}
else if (dvar_defined(name) || local_id(name)) {
-
rb_warningS("shadowing outer local variable - %s",
rb_id2name(name));
vtable_add(lvtbl->vars, name);
}
}