ruby-changes:42092
From: mrkn <ko1@a...>
Date: Fri, 18 Mar 2016 02:17:11 +0900 (JST)
Subject: [ruby-changes:42092] mrkn:r54166 (trunk): * numeric.c (fix_zero_p, fix_even_p, fix_odd_p): remove needless
mrkn 2016-03-18 02:17:08 +0900 (Fri, 18 Mar 2016) New Revision: 54166 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54166 Log: * numeric.c (fix_zero_p, fix_even_p, fix_odd_p): remove needless functions. Modified files: trunk/ChangeLog trunk/numeric.c Index: numeric.c =================================================================== --- numeric.c (revision 54165) +++ numeric.c (revision 54166) @@ -4032,55 +4032,6 @@ int_round(int argc, VALUE* argv, VALUE n https://github.com/ruby/ruby/blob/trunk/numeric.c#L4032 } /* - * call-seq: - * fix.zero? -> true or false - * - * Returns +true+ if +fix+ is zero. - * - */ - -static VALUE -fix_zero_p(VALUE num) -{ - if (FIX2LONG(num) == 0) { - return Qtrue; - } - return Qfalse; -} - -/* - * call-seq: - * fix.odd? -> true or false - * - * Returns +true+ if +fix+ is an odd number. - */ - -static VALUE -fix_odd_p(VALUE num) -{ - if (num & 2) { - return Qtrue; - } - return Qfalse; -} - -/* - * call-seq: - * fix.even? -> true or false - * - * Returns +true+ if +fix+ is an even number. - */ - -static VALUE -fix_even_p(VALUE num) -{ - if (num & 2) { - return Qfalse; - } - return Qtrue; -} - -/* * Document-class: ZeroDivisionError * * Raised when attempting to divide an integer by 0. Index: ChangeLog =================================================================== --- ChangeLog (revision 54165) +++ ChangeLog (revision 54166) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Mar 18 02:17:00 2016 Kenta Murata <mrkn@m...> + + * numeric.c (fix_zero_p, fix_even_p, fix_odd_p): remove needless + functions. + Fri Mar 18 02:15:00 2016 Kenta Murata <mrkn@m...> * numeric.c (int_even_p): treat Fixnum and Bignum values directly. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/