google-code-export / appengine-jruby

Automatically exported from code.google.com/p/appengine-jruby
0 stars 0 forks source link

dm-appengine should support BigDecimal #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. cd dm-appengine
2. jruby -S rake spec

What is the expected output? What do you see instead?

'DataMapper::Adapters::AppEngineAdapter types should support BigDecimal' 
FAILED
expected: #<BigDecimal:4cc7014c,'0.1E1',1(4)>,
     got: "0.1E1" (using ==)

Someone released a Java implementation of lexically-sorted BigDecimals (as 
strings) on the Java mailing list:

http://www.mail-archive.com/google-appengine-
java@googlegroups.com/msg01855.html

If this is not usable directly, he links to a paper:

www.zanopha.com/docs/elen.ps

It looks simple enough to do in Ruby, but I'm curious if it makes sense to 
use the Java implementation, so Java developers also get this feature.

Original issue reported on code.google.com by ninja@slaphack.com on 3 Jan 2010 at 12:08

GoogleCodeExporter commented 9 years ago

Original comment by ninja@slaphack.com on 3 Jan 2010 at 12:10