[ruby-talk:02390] Re: Ruby/Glade usage questions.

From: Yasushi Shoji <yashi@...>
Date: 2000-04-08 04:06:17 UTC
List: ruby-talk #2390
From: ts <decoux@moulon.inra.fr>
Subject: [ruby-talk:02212] Re: Ruby/Glade usage questions.
Date: Tue, 28 Mar 2000 09:15:32 +0200 (MET DST)

> m> I think Python can marshal arbitratry construct to the disk. So is it
> m> possible to make this kind of pickling possible for Ruby too? I think
> m> loading ready datastructure on dedicated C-extension would be the fastest
> m> thing to do (instead of XML parsing, or Ruby parsing).
> 
>  ruby has a Marshall module, but :
> 
>  * the interpreter is a "black box"
>  * difficult to do it with 1.4.3 because you need to distinguish  a symbol
>  (i.e a ID) from a constant (it's possible now in 1.5. I think)

# late, late, late, late, late, late ;p

Ruby/Gtk uses class Data a lot.  Marshal.dump can't handle it, AFAIK
--
            yashi


require 'gtk'

obj = Gtk::Window.new
out = File.new('out.file', 'w+')

Marshal.dump(obj, out)



$ ruby gtkmarshal.rb
gtkmarshal.rb:6:in `dump': can't dump Data (TypeError)
	from gtkmarshal.rb:6

In This Thread