Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Bug in 1.8.7-p249, the version shipped with Ubuntu 10.04

Reply
Thread Tools

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

 
 
Intransition
Guest
Posts: n/a
 
      10-01-2010
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?

 
Reply With Quote
 
 
 
 
Urabe Shyouhei
Guest
Posts: n/a
 
      10-01-2010
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.

 
Reply With Quote
 
 
 
 
Intransition
Guest
Posts: n/a
 
      10-01-2010


On Oct 1, 11:06=A0am, Urabe Shyouhei <(E-Mail Removed)> wrote:
> Hello,
>
> (2010/10/01 22:39), Intransition wrote:
> > =A0 NoMethodError: super called outside of method
> > =A0 =A0from (irb):7
> > =A0 =A0from (irb):11:in `call'
> > =A0 =A0from (irb):11:in `f'
> > =A0 =A0from (irb):6:in `q'
> > =A0 =A0from (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. =A0Try 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.

http://www.lucas-nussbaum.net/blog/?p=3D566




 
Reply With Quote
 
Lucas Nussbaum
Guest
Posts: n/a
 
      10-01-2010
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Where to get stand alone Dot Net Framework version 1.1, version2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? MowGreen [MVP] ASP .Net 5 02-09-2008 01:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] ASP .Net 0 02-05-2008 03:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green ASP .Net 0 02-05-2008 02:45 AM
Since which version is STL shipped with Gnu-C++ ? Rolf Hemmerling C++ 3 10-10-2003 12:07 PM



Advertisments