diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-19 13:59:08 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-19 13:59:08 +0000 |
commit | ed0bdbc575093c209d665e4d516f78dd9a93b26a (patch) | |
tree | f8d730c07e4f030d373f322fc63d9d7457214ec5 /rational.c | |
parent | f86ad72d2a2fe28004570c401f506a713e764fec (diff) |
* rational.c; edited rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/rational.c b/rational.c index 8bfe937d2f..4e0d7d6a71 100644 --- a/rational.c +++ b/rational.c @@ -1798,6 +1798,11 @@ integer_denominator(VALUE self) * flo.numerator => integer * * Returns the numerator of _flo_ as an +Integer+ object. + * + * For example: + * + * 0.3.numerator #=> 5404319552844595 # machine dependent + * lambda{|x| x.numerator.fdiv(x.denominator)}.call(0.3) #=> 0.3 */ static VALUE float_numerator(VALUE self) @@ -1813,6 +1818,11 @@ float_numerator(VALUE self) * flo.denominator => integer * * Returns the denominator of _flo_ as an +Integer+ object. + * + * For example: + * + * 0.3.denominator #=> 18014398509481984 # machine dependent + * lambda{|x| x.numerator.fdiv(x.denominator)}.call(0.3) #=> 0.3 */ static VALUE float_denominator(VALUE self) @@ -1839,7 +1849,6 @@ nilclass_to_r(VALUE self) return rb_rational_new1(INT2FIX(0)); } - /* * call-seq: * int.to_r => rational |