# Bug in 1.8.7-p249, the version shipped with Ubuntu 10.04

**URL:** <https://www.ruby-forum.com/t/bug-in-1-8-7-p249-the-version-shipped-with-ubuntu-10-04/195868>\
**Category:** Ruby\
**Created:** [October 1, 2010, 3:43pm UTC](https://www.ruby-forum.com/t/bug-in-1-8-7-p249-the-version-shipped-with-ubuntu-10-04/195868 "2010-10-01T15:43:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [October 1, 2010, 3:43pm UTC](https://www.ruby-forum.com/t/bug-in-1-8-7-p249-the-version-shipped-with-ubuntu-10-04/195868/1 "2010-10-01T15:43:46Z")

</div>

I recently upgraded from 1.8.7-p72 to 1.8.7-p249 and a piece of code  
that I had long relied on stopped working. Here is an example of the  
issue:

class X  
def q; “q”; end  
end

class Y \< X  
def q  
f do  
super()  
end  
end  
def f(&b)  
b.call  
end  
end

y = Y.new  
y.q

NoMethodError: super called outside of method  
from (irb):7  
from (irb):11:in `call' from (irb):11:in`f’  
from (irb):6:in `q’  
from (irb):15

I tried this on 1.9.2 and it works so I am assuming this is a bug with  
p249?

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [October 1, 2010, 5:10pm UTC](https://www.ruby-forum.com/t/bug-in-1-8-7-p249-the-version-shipped-with-ubuntu-10-04/195868/2 "2010-10-01T17:10:25Z")

</div>

Hello,

(2010/10/01 22:39), Intransition wrote:

> NoMethodError: super called outside of method  
> from (irb):7  
> from (irb):11:in `call' from (irb):11:in`f’  
> from (irb):6:in `q’  
> from (irb):15
> 
> I tried this on 1.9.2 and it works so I am assuming this is a bug with  
> p249?

Yes and fixed already. Try a newer patchlevel.

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [October 1, 2010, 8:09pm UTC](https://www.ruby-forum.com/t/bug-in-1-8-7-p249-the-version-shipped-with-ubuntu-10-04/195868/3 "2010-10-01T20:09:33Z")

</div>

On Oct 1, 11:06 am, Urabe S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > I tried this on 1.9.2 and it works so I am assuming this is a bug with  
> > p249?
> 
> Yes and fixed already. Try a newer patchlevel.

Thanks. I was hoping the Debian/Ubuntu package maintainer would get  
wind of it by posting it to ruby-talk.

Interestingly I was looking for someone to contact and came across  
this blog post.

[Ruby packaging in Debian and Ubuntu: Mythbusting and FAQ – Lucas Nussbaum's Blog](http://www.lucas-nussbaum.net/blog/?p=566)

---

<div class="post-metadata">

**Author:** ![tcsnide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/eb8c5e/32.png) [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Post date:** [October 1, 2010, 9:36pm UTC](https://www.ruby-forum.com/t/bug-in-1-8-7-p249-the-version-shipped-with-ubuntu-10-04/195868/4 "2010-10-01T21:36:46Z")

</div>

On 01/10/10 at 22:39 +0900, Intransition wrote:

> ```
> f do
> 
> ```
> 
> NoMethodError: super called outside of method  
> from (irb):7  
> from (irb):11:in `call' from (irb):11:in `f’  
> from (irb):6:in `q’  
> from (irb):15
> 
> I tried this on 1.9.2 and it works so I am assuming this is a bug with  
> p249?

Would you mind reporting this as a bug on  
[Bugs : ruby1.8 package : Ubuntu](https://bugs.launchpad.net/ubuntu/+source/ruby1.8) ?

I’ll try to take it from there.

- Lucas
