# Globalize Currency Negative Value Error

**URL:** <https://www.ruby-forum.com/t/globalize-currency-negative-value-error/97338>\
**Category:** Rails I18n\
**Created:** [July 6, 2006, 2:05pm UTC](https://www.ruby-forum.com/t/globalize-currency-negative-value-error/97338 "2006-07-06T14:05:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathaniel\_Bibler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f17d59/32.png) [@Nathaniel\_Bibler](https://www.ruby-forum.com/u/Nathaniel_Bibler)\
**Post date:** [July 6, 2006, 2:05pm UTC](https://www.ruby-forum.com/t/globalize-currency-negative-value-error/97338/1 "2006-07-06T14:05:09Z")

</div>

I’ve got the Globalize-1.1 release installed and have been using the  
globalize plugin for a month or so now. My base locale is en-US, Ruby  
1.8.4 (2005-12-24), Rails 1.1.2. Here’s the problem taken from  
./script/console:

Loading development environment.

> > Globalize::Currency.new("-340")  
> > =\> #\<Globalize::Currency:0x2337478 @cents=-340\>
> 
> > Globalize::Currency.new("-340").to\_s  
> > =\> “-4.60”
> 
> > Globalize::Currency.new(“340”).to\_s  
> > =\> “3.40”
> 
> > Globalize::Currency.new("-340").to\_s  
> > =\> “-4.60”

> > Locale.set(“en-US”)  
> > =\> …
> 
> > Globalize::Currency.new("-340").format  
> > =\> “-$4.60”
> 
> > Globalize::Currency.new(“340”).format  
> > =\> “$3.40”

Any insights and/or patches would be greatly appreciated.

Nate
