# SEGV by ary.permutation again

**URL:** <https://www.ruby-forum.com/t/segv-by-ary-permutation-again/116747>\
**Category:** Development\
**Created:** [October 9, 2007, 10:14am UTC](https://www.ruby-forum.com/t/segv-by-ary-permutation-again/116747 "2007-10-09T10:14:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanaka\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Post date:** [October 9, 2007, 10:14am UTC](https://www.ruby-forum.com/t/segv-by-ary-permutation-again/116747/1 "2007-10-09T10:14:48Z")

</div>

e$B0J2\<$N$h$&$K$9$k$He(B SEGV e$B$7$^$9!#e(B

## % ./ruby -e ’ ary = (1…100).to\_a ary.permutation(2) {|x| if x == [1,2] ObjectSpace.each\_object(Array) {|o| o.clear if o == ary && o.object\_id != ary.object\_id } end }’ -e:4: – control frame ---------- c:0007 p:---- s:0018 b:0018 l:000017 d:000017 CFUNC :== c:0006 p:0006 s:0014 b:0014 l:000005 d:000013 BLOCK -e:4 c:0005 p:---- s:0013 b:0012 l:000011 d:000011 FINISH :each c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :permutation c:0003 p:0020 s:0006 b:0006 l:000005 d:000005 TOP -e:3 c:0002 p:---- s:0003 b:0003 l:000002 d:000002 FINISH :inherited c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------

DBG\> : “-e:4:in `block in <main>'" DBG> : "-e:3:in`permutation’”  
DBG\> : “-e:3:in `’”  
– backtrace of native function call (Use addr2line) –  
0x80f9e76  
0x8117164  
0x8117203  
0x80c2bc5  
0xb7f47420  
0x805cb2b  
0x8078eeb  
0x81038ad  
0x80fd64c  
0x8103974  
0x80f00b5  
0x80f79a5  
0x80f7522  
0x80f58d5  
0x80f7b7e  
0x80f0d64  
0x80f0e32  
0x805b9f6  
0x805ba38  
0x8104711  
0x8104698  
0x810490d  
0x80f00b5  
0x80f79a5  
0x80f7522  
0x80f3ed9  
0x80f7b7e  
0x80f81c3  
0x805aafd  
0x805abac  
0x8057d74  
0xb7db1ea8  
0x8057c91
