diff options
| author | shigek <shigek@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-29 13:20:08 +0000 |
|---|---|---|
| committer | shigek <shigek@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-29 13:20:08 +0000 |
| commit | 8924d9c3e96ffb2c58038afb47cbba3860ccde47 (patch) | |
| tree | 2334378f75cf504c9a54a63c962d74982974522e /ext/bigdecimal | |
| parent | bffcdda2e53467aee6883fedb651ce02ac4ad415 (diff) | |
| download | ruby-8924d9c3e96ffb2c58038afb47cbba3860ccde47.tar.gz ruby-8924d9c3e96ffb2c58038afb47cbba3860ccde47.tar.xz ruby-8924d9c3e96ffb2c58038afb47cbba3860ccde47.zip | |
Bug in '/' fixed by Tadashi Saito.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal')
| -rw-r--r-- | ext/bigdecimal/bigdecimal.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index f1bd1e232..b8b1a068e 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -683,8 +683,10 @@ BigDecimal_div(VALUE self, VALUE r) /* c xxxxx r 00000yyyyy ==> (y/b)*BASE >= HALF_BASE */ - /* Round up ? */ - VpInternalRound(c,0,c->frac[c->Prec-1],(VpBaseVal()*res->frac[0])/div->frac[0]); + /* Round */ + if(VpIsDef(c)) { + VpInternalRound(c,0,c->frac[c->Prec-1],(VpBaseVal()*res->frac[0])/div->frac[0]); + } return ToValue(c); } |
