# \[BUG\] SEGV at ZSUPER in a block

**URL:** <https://www.ruby-forum.com/t/bug-segv-at-zsuper-in-a-block/105418>\
**Category:** Development\
**Created:** [May 29, 2007, 8:36pm UTC](https://www.ruby-forum.com/t/bug-segv-at-zsuper-in-a-block/105418 "2007-05-29T20:36:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 29, 2007, 8:36pm UTC](https://www.ruby-forum.com/t/bug-segv-at-zsuper-in-a-block/105418/1 "2007-05-29T20:36:23Z")

</div>

e$B$J$+$@$G$9!#e(B

[http://pc11.2ch.net/test/read.cgi/tech/1178167650/498](http://pc11.2ch.net/test/read.cgi/tech/1178167650/498) e$B$G!"0J2\<e(B  
e$B$N%3!\<%I$,e(BSEGVe$B$9$k$H$$$&OC$,=P$F$^$9!#e(B

class C0  
def a(\*args) p “C0#a”, args end  
end

class C1 \< C0  
def a() @h = Hash.new { super } end  
def b(k) @h[k] end  
end

class C2 \< C0  
h = nil  
define\_method(:a) { h = Hash.new { super } }  
define\_method(:b) { |k| h[k] }  
end

c2 = C2.new  
c2.a  
c2.b 10

c1 = C1.new  
c1.a  
c1.b 10

# Index: eval.c

— eval.c (revision 12402)  
+++ eval.c (working copy)  
@@ -3505,4 +3505,8 @@ rb\_eval(self, n)  
argv = RARRAY(RBASIC(ruby\_scope)-\>klass)-\>ptr;  
}

- else if (!ruby\_scope-\>local\_vars) {
- 

```
   argc = 0;

```

- 

```
   argv = 0;

```

- }  
else {  
argv = ruby\_scope-\>local\_vars + 2;

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 29, 2007, 8:56pm UTC](https://www.ruby-forum.com/t/bug-segv-at-zsuper-in-a-block/105418/2 "2007-05-29T20:56:24Z")

</div>

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

In message “Re: [ruby-dev:30836] [BUG] SEGV at ZSUPER in a block”  
on Wed, 30 May 2007 03:35:17 +0900, removed\_email\_address@domain.invalid writes:

|http://pc11.2ch.net/test/read.cgi/tech/1178167650/498 e$B$G!"0J2\<e(B  
|e$B$N%3!\<%I$,e(BSEGVe$B$9$k$H$$$&OC$,=P$F$^$9!#e(B

e$B%3%\_%C%H$7$F$/$@$5$$e(B
