[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

Re: Planning to release 1.8.6 errata

From: Calamitas <calamitates@...>
Date: 2007-05-26 21:36:12 UTC
List: ruby-core #11262
On 26/05/07, Urabe Shyouhei <shyouhei@ruby-lang.org> wrote:
> Hi,
>
> Urabe Shyouhei wrote:
> > Calamitas wrote:
> >
> >> Seems like the issue reported in [ruby-talk:248647] has not been
> >> resolved yet in the ruby_1_8 branch. I've attached the patch again.
> >>
> >
> > Thank you, I was not aware of this thread.
> >
>
> I've adopted your patch for Object#method into both ruby_1_8_6 and
> ruby_1_8_5 branches, but not for Method#inspect, as that did not seem
> like a logical bug to me.  Discussions are welcomed. And wait knu
> (ruby_1_8 branch manager) for its adoption for ruby 1.8.7 and above.

Method#inspect had no bug that I'm aware of; I only changed it to
preserve its behavior. Building on the example of the OP in
[ruby-talk:248647]:

  # Before the patch
      Baz.new.method(:boo).inspect  #=>  "#<Method: Baz(Bar)#boo>"
  # After the patch to only Object#method
      Baz.new.method(:boo).inspect  #=>  "#<Method: Baz(Foo)#boo>"
  # After the patch to both Object#method and Method#inspect
      Baz.new.method(:boo).inspect  #=>  "#<Method: Baz(Bar)#boo>"

The method is really defined in Bar, not in Foo. A difference in the
inspect string may not seem like a big deal, but people may rely on
it, for instance to retrieve the defining class or module.

Peter

In This Thread