[Ironruby-core] digest.so implemented

Peter Bacon Darwin bacondarwin at googlemail.com
Thu Feb 28 03:35:00 EST 2008

You are really on a roll Wayne.  Great stuff!

I might be wrong but my impression of the IronRuby support for the various
.NET interfaces, such as IDuplicable, IEnumerable and so on, was purely to
support .NET interop and not designed to be the mechanism used by actual
Ruby libraries.  So I suppose the most comprehensive method would be to
support both initialize_copy and IDuplicable if you can and then one or the
other if you can't (i.e. you are developing only in Ruby or you have a 3rd
party .NET class).

Correct me if I'm wrong.


-----Original Message-----
From: ironruby-core-bounces at rubyforge.org
[mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Wayne Kelly
Sent: Thursday,28 February 28, 2008 03:51
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] digest.so implemented

Attached is an implementation of the methods and classes from external
library digest.so that are used by some simple Rails use cases.


I note, that the IronRuby pattern for supporting custom object cloning it to
implement the IDuplicable interface. Is there some reason for this approach
rather than using Ruby's standard mechanism of implementing an
initialize_copy method? With the latter approach, Ruby programmers can
implement their own copy semantics, eg:

class Foo
    def initialize_copy(c)
      puts 'copying'
f = Foo.new
g = f.clone

Cheers, Wayne.

More information about the Ironruby-core mailing list