ruby-changes:26448
From: nobu <ko1@a...>
Date: Thu, 20 Dec 2012 18:30:06 +0900 (JST)
Subject: [ruby-changes:26448] nobu:r38499 (trunk): ruby.h: RTEST NIL_P
nobu 2012-12-20 18:29:57 +0900 (Thu, 20 Dec 2012) New Revision: 38499 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38499 Log: ruby.h: RTEST NIL_P * include/ruby/ruby.h (RTEST, NIL_P): make bare expressions without outermost parentheses. Modified files: trunk/ChangeLog trunk/include/ruby/ruby.h Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 38498) +++ include/ruby/ruby.h (revision 38499) @@ -442,8 +442,8 @@ enum ruby_special_consts { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L442 #endif #define SYMBOL_FLAG RUBY_SYMBOL_FLAG -#define RTEST(v) (((VALUE)(v) & ~Qnil) != 0) -#define NIL_P(v) ((VALUE)(v) == Qnil) +#define RTEST(v) !(((VALUE)(v) & ~Qnil) == 0) +#define NIL_P(v) !((VALUE)(v) != Qnil) #define CLASS_OF(v) rb_class_of((VALUE)(v)) Index: ChangeLog =================================================================== --- ChangeLog (revision 38498) +++ ChangeLog (revision 38499) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Dec 20 18:29:54 2012 Nobuyoshi Nakada <nobu@r...> + + * include/ruby/ruby.h (RTEST, NIL_P): make bare expressions without + outermost parentheses. + Thu Dec 20 17:29:00 2012 Shugo Maeda <shugo@r...> * NEWS: fix the description for Refinements. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/