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

Discussion in 'Ruby' started by Intransition, Oct 1, 2010.

  1. Intransition

    Intransition Guest

    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?
     
    Intransition, Oct 1, 2010
    #1
    1. Advertising

  2. 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.
     
    Urabe Shyouhei, Oct 1, 2010
    #2
    1. Advertising

  3. Intransition

    Intransition Guest

    On Oct 1, 11:06=A0am, Urabe Shyouhei <> 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
     
    Intransition, Oct 1, 2010
    #3
  4. 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
     
    Lucas Nussbaum, Oct 1, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rolf Hemmerling
    Replies:
    3
    Views:
    947
    tom_usenet
    Oct 10, 2003
  2. Steve B.

    "Unused" dataset shipped in WSDL ?

    Steve B., Jun 26, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    351
    Steve B.
    Jun 26, 2006
  3. Replies:
    2
    Views:
    398
    Cameron Laird
    Dec 29, 2005
  4. V Green
    Replies:
    0
    Views:
    865
    V Green
    Feb 5, 2008
  5. PA Bear [MS MVP]
    Replies:
    0
    Views:
    975
    PA Bear [MS MVP]
    Feb 5, 2008
Loading...

Share This Page