From: Lucas Nussbaum Date: 2010-10-02T04:35:54+09:00 Subject: Re: Bug in 1.8.7-p249, the version shipped with Ubuntu 10.04 On 01/10/10 at 22:39 +0900, Intransition wrote: > 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? Would you mind reporting this as a bug on https://bugs.launchpad.net/ubuntu/+source/ruby1.8 ? I'll try to take it from there. - Lucas