[#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

[ ruby-Bugs-9376 ] Marshal.dump shouldn't complain about singletons if the _dump method is defined

From: <noreply@...>
Date: 2007-05-10 03:00:17 UTC
List: ruby-core #11138
Bugs item #9376, was opened at 2007-03-20 00:58
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=9376&group_id=426

Category: Core
Group: 1.8.6
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Sylvain Joyeux (lapinot)
Assigned to: Nobody (None)
Summary: Marshal.dump shouldn't complain about singletons if the _dump method is defined

Initial Comment:
Some of the objects I dump have singleton classes. It's not an accident, and I'm aware of that. The thing is that I defined _dump, thinking it would tell the interpreter that I know what I'm doing. It's not the case. Is that really the intended behaviour ?

Here is the testcase:

[~/dev/urus]% cat tmp.rb
class Test
    def _dump(lvl)
        ""
    end
end

t = Test.new
class << t
    @bla = 10
end
Marshal.dump(t)


[~/dev/urus]% ruby tmp.rb
tmp.rb:11:in `dump': singleton can't be dumped (TypeError)
        from tmp.rb:11

[~/dev/urus]% ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-linux]


----------------------------------------------------------------------

Comment By: Yukihiro Matsumoto (matz)
Date: 2007-05-10 12:00

Message:
This bug is fixed in the repository.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=9376&group_id=426

In This Thread

Prev Next