summaryrefslogtreecommitdiff
path: root/include/ruby/ruby.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-20 09:29:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-20 09:29:57 +0000
commit8497a7b9187a05210a4f6b842d06d1268d704d35 (patch)
tree6ed29ae6acc708198d994cb556f24b6a70881fc7 /include/ruby/ruby.h
parentee26f5ec253b17ed7e7d63ed818b060e70b345a7 (diff)
ruby.h: RTEST NIL_P
* include/ruby/ruby.h (RTEST, NIL_P): make bare expressions without outermost parentheses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r--include/ruby/ruby.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index b39cbf7864..0a1d29a1fe 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -442,8 +442,8 @@ enum ruby_special_consts {
#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))