I see. Thanks for the help.
Cheers,
Vladimir

> -----Original Message-----
> From: ruby-talk [mailto:ruby-talk-bounces / ruby-lang.org] On Behalf Of Ryan
> Davis
> Sent: Thursday, January 30, 2014 8:20 PM
> To: Ruby Talk
> Subject: Re: to_f and the format of E notation
> 
> 
> On Jan 29, 2014, at 18:31, Vladimir, Chalupecky <chalupecky / jp.fujitsu.com>
> wrote:
> 
> > irb(main):001:0> "70.-1".sub(/([\d\.])[eE]?([+-])/, '\1e\2') =>
> > "70.e-1"
> 
> Remember, we use "." for many things, the most important being method
> dispatch.
> 
> That string looks like sending a method named 'e' to the integer 70: 70.e() - 1
> 
> Full fledged floats have both an integer part and a fractional part, or they're
> integers with scientific notation:
> 
> 70e-1
> 70.0e-1
> 
> That disambiguates them from methods.
> 
> >> 70e-1
> => 7.0
> >> 70.0e-1
> => 7.0
> >> 70.e-1
> NoMethodError: undefined method `e' for 70:Fixnum
> 	from (irb):2
> 	from /usr/bin/irb:12:in `<main>'