ruby-changes:46050
From: usa <ko1@a...>
Date: Sun, 26 Mar 2017 03:27:02 +0900 (JST)
Subject: [ruby-changes:46050] usa:r58121 (ruby_2_2): merge revision(s) 57686: [Backport #13233]
usa 2017-03-26 03:26:56 +0900 (Sun, 26 Mar 2017) New Revision: 58121 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58121 Log: merge revision(s) 57686: [Backport #13233] 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] [ruby-core:79607] [Bug #13233] Author: Marcus Stollsteimer <sto.mar@w...> Modified directories: branches/ruby_2_2/ Modified files: branches/ruby_2_2/rational.c branches/ruby_2_2/version.h Index: ruby_2_2/version.h =================================================================== --- ruby_2_2/version.h (revision 58120) +++ ruby_2_2/version.h (revision 58121) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1 #define RUBY_VERSION "2.2.7" #define RUBY_RELEASE_DATE "2017-03-26" -#define RUBY_PATCHLEVEL 453 +#define RUBY_PATCHLEVEL 454 #define RUBY_RELEASE_YEAR 2017 #define RUBY_RELEASE_MONTH 3 Index: ruby_2_2/rational.c =================================================================== --- ruby_2_2/rational.c (revision 58120) +++ ruby_2_2/rational.c (revision 58121) @@ -1243,8 +1243,7 @@ nurat_ceil(VALUE self) https://github.com/ruby/ruby/blob/trunk/ruby_2_2/rational.c#L1243 * * 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 @@ -1332,9 +1331,9 @@ f_round_common(int argc, VALUE *argv, VA https://github.com/ruby/ruby/blob/trunk/ruby_2_2/rational.c#L1331 * 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" @@ -1356,9 +1355,9 @@ nurat_floor_n(int argc, VALUE *argv, VAL https://github.com/ruby/ruby/blob/trunk/ruby_2_2/rational.c#L1355 * 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" @@ -1380,9 +1379,9 @@ nurat_ceil_n(int argc, VALUE *argv, VALU https://github.com/ruby/ruby/blob/trunk/ruby_2_2/rational.c#L1379 * 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" @@ -1405,9 +1404,9 @@ nurat_truncate_n(int argc, VALUE *argv, https://github.com/ruby/ruby/blob/trunk/ruby_2_2/rational.c#L1404 * 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" Property changes on: ruby_2_2 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r57686 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/