diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | rational.c | 27 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 25 insertions, 15 deletions
@@ -1,3 +1,14 @@ +Wed Jan 31 20:02:29 2018 Kazuhiro NISHIYAMA <zn@mbf.nifty.com> + + rational.c: fix rdoc + + * rational.c: [DOC] fix wrong indentations and comment out some lines + in code examples to make them valid Ruby code and syntax highlighted + on the rendered page. + + [ci skip] [Bug #13233] + Author: Marcus Stollsteimer sto.mar@web.de + Wed Jan 31 19:57:09 2018 Eric Wong <normalperson@yhbt.net> doc: Add example for Symbol#to_s diff --git a/rational.c b/rational.c index ca65518c82..97fb16ddd6 100644 --- a/rational.c +++ b/rational.c @@ -1247,8 +1247,7 @@ nurat_ceil(VALUE self) * * Returns the truncated value as an integer. * - * Equivalent to - * rat.truncate. + * Equivalent to Rational#truncate. * * Rational(2, 3).to_i #=> 0 * Rational(3).to_i #=> 3 @@ -1336,9 +1335,9 @@ f_round_common(int argc, VALUE *argv, VALUE self, VALUE (*func)(VALUE)) * Rational(2, 3).floor #=> 0 * Rational(-3, 2).floor #=> -1 * - * decimal - 1 2 3 . 4 5 6 - * ^ ^ ^ ^ ^ ^ - * precision -3 -2 -1 0 +1 +2 + * # decimal - 1 2 3 . 4 5 6 + * # ^ ^ ^ ^ ^ ^ + * # precision -3 -2 -1 0 +1 +2 * * '%f' % Rational('-123.456').floor(+1) #=> "-123.500000" * '%f' % Rational('-123.456').floor(-1) #=> "-130.000000" @@ -1360,9 +1359,9 @@ nurat_floor_n(int argc, VALUE *argv, VALUE self) * Rational(2, 3).ceil #=> 1 * Rational(-3, 2).ceil #=> -1 * - * decimal - 1 2 3 . 4 5 6 - * ^ ^ ^ ^ ^ ^ - * precision -3 -2 -1 0 +1 +2 + * # decimal - 1 2 3 . 4 5 6 + * # ^ ^ ^ ^ ^ ^ + * # precision -3 -2 -1 0 +1 +2 * * '%f' % Rational('-123.456').ceil(+1) #=> "-123.400000" * '%f' % Rational('-123.456').ceil(-1) #=> "-120.000000" @@ -1384,9 +1383,9 @@ nurat_ceil_n(int argc, VALUE *argv, VALUE self) * Rational(2, 3).truncate #=> 0 * Rational(-3, 2).truncate #=> -1 * - * decimal - 1 2 3 . 4 5 6 - * ^ ^ ^ ^ ^ ^ - * precision -3 -2 -1 0 +1 +2 + * # decimal - 1 2 3 . 4 5 6 + * # ^ ^ ^ ^ ^ ^ + * # precision -3 -2 -1 0 +1 +2 * * '%f' % Rational('-123.456').truncate(+1) #=> "-123.400000" * '%f' % Rational('-123.456').truncate(-1) #=> "-120.000000" @@ -1409,9 +1408,9 @@ nurat_truncate_n(int argc, VALUE *argv, VALUE self) * Rational(2, 3).round #=> 1 * Rational(-3, 2).round #=> -2 * - * decimal - 1 2 3 . 4 5 6 - * ^ ^ ^ ^ ^ ^ - * precision -3 -2 -1 0 +1 +2 + * # decimal - 1 2 3 . 4 5 6 + * # ^ ^ ^ ^ ^ ^ + * # precision -3 -2 -1 0 +1 +2 * * '%f' % Rational('-123.456').round(+1) #=> "-123.500000" * '%f' % Rational('-123.456').round(-1) #=> "-120.000000" @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.3.7" #define RUBY_RELEASE_DATE "2018-01-31" -#define RUBY_PATCHLEVEL 387 +#define RUBY_PATCHLEVEL 388 #define RUBY_RELEASE_YEAR 2018 #define RUBY_RELEASE_MONTH 1 |