[Ironruby-core] IronRuby and System::Decimal

Curt Hagenlocher curth at microsoft.com
Thu Nov 6 19:42:49 EST 2008

Originally, I had hacked in "decimal" to be our BigDecimal representation.  Now that we have a real BigDecimal (courtesy of Peter Bacon Darwin), the CLR decimal type has become an orphan -- it doesn't really have any direct support in IronRuby, so you just get the same behavior that you'd get for any other random CLR object.

Let me pose this question to the list: which classes in the BCL (if any) do you think should get the "Rubification" treatment?

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ben Hall
Sent: Thursday, November 06, 2008 4:20 PM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] IronRuby and System::Decimal


Just playing around with some .Net interop and the Decimal type. When
I do puts, I expected that this would have given me the underlying
number, or at least call to_string.

Instead I got the following behaviour, with the object type being outputted.

>>> @d = System::Decimal.MinValue
=> #<System::Decimal:0x000005c>
>>> puts @d
=> nil
>>> puts @d.to_string
=> nil

Is this by design?


Ironruby-core mailing list
Ironruby-core at rubyforge.org

More information about the Ironruby-core mailing list