Hi all
i am trying to use round method if have a value 2.08 i want it as 2.1
and
it worked in 1.9.2 but not in 1.8.7 is there any other way of doing it.
irb(main):001:0> 2.08.round
=> 2
irb(main):002:0> 2.08.round(1)
ArgumentError: wrong number of arguments (1 for 0)
from (irb):2:in `round’
from (irb):2
from :0
i can able to use round but not with one decimal
It is no good saying “it did not work”. Show us what you did and what
the result was and what you expected. Copy/paste it from the console
so we can see exactly what happened.
On Wed, Sep 12, 2012 at 3:16 PM, Jim Ruther N. [email protected]
wrote:
but i what i was expecting is like if i give input as 2.08 i need my
i am trying to use round method if have a value 2.08 i want it as 2.1
USING 1.8.7
Can any tell how can i get round(1) in 1.8.7
You received this message because you are subscribed to the Google
To unsubscribe from this group, send email to
To unsubscribe from this group, send email to
visit my blog at http://jimlabs.heroku.com
– “•▬●๋•ýáککhừ•▬•●๋ ╰» єριтσмє σƒ ℓσνє…”
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.