Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6313 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

[PATCH] Bignums XML encoded/decoded as integer type

Reported by: edibiase Assigned to: David
Priority: normal Milestone: 1.x
Component: ActiveSupport Version: edge
Severity: normal Keywords:
Cc:

Description

I'm working on some code that needs to represent (typically large) millisecond values in XML. I noticed that, when these values were Bignums, to_xml wasn't encoding them with any type information.

So, this patch enhances to_xml to encode Bignums as integers (with tests to prove it), and also beefs up the XML decoding tests to ensure that integer values that would be represented as Bignums are properly decoded from XML that defines them as integers.

Attachments

bignums_as_integer_xml_type.diff (4.5 kB) - added by edibiase on 09/29/06 18:20:27.

Change History

09/29/06 18:20:27 changed by edibiase

  • attachment bignums_as_integer_xml_type.diff added.

09/29/06 22:23:16 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [5209]) Hash#to_xml supports Bignum and BigDecimal. Closes #6313.