procとmapでsegv

[email protected]>;3OB9-$G$9!#e(B

ruby_1_8e$B$,<!$N$h$&$J%3!<%I$Ge(Bsegmentation faulte$B$K$J$j$^$9!#e(B
[email protected]$He(BSystemStackErrore$B$K$J$j$^$9!#e(B

% cat segv.rb
f=proc{|c,*r|f[r].map{}}
f[:any]
% ruby18 -v segv.rb
ruby 1.8.6 (2007-02-15 patchlevel 5000) [i686-linux]
zsh: 7787 segmentation fault ruby18 -v segv.rb
% ruby -v segv.rb
ruby 1.8.2 (2005-04-11) [i386-linux]
zsh: 8556 segmentation fault ruby -v segv.rb
% ruby-1.8.5 -v segv.rb
ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-linux]
segv.rb:1: stack level too deep (SystemStackError)
from segv.rb:1:in []' from segv.rb:1 from segv.rb:1:in[]
from segv.rb:1
from segv.rb:1:in []' from segv.rb:1 from segv.rb:1:in[]
from segv.rb:1
2662 levels
from segv.rb:1:in []' from segv.rb:1 from segv.rb:2:in[]
from segv.rb:2
%

Kazuhiro NISHIYAMA wrote:

ruby_1_8e$B$,<!$N$h$&$J%3!<%I$Ge(Bsegmentation faulte$B$K$J$j$^$9!#e(B

e$B$3$j$c4{CN$NLdBje(B(e$B%9%?%C%/$"$U$l$OI,$:$7$b8!=P$G$-$J$$e(B)e$B$8$c$J$$$G$9$+$M!#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