mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
ee26f5ec25
commit
8497a7b918
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Dec 20 18:29:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* include/ruby/ruby.h (RTEST, NIL_P): make bare expressions without
|
||||||
|
outermost parentheses.
|
||||||
|
|
||||||
Thu Dec 20 17:29:00 2012 Shugo Maeda <shugo@ruby-lang.org>
|
Thu Dec 20 17:29:00 2012 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
* NEWS: fix the description for Refinements.
|
* NEWS: fix the description for Refinements.
|
||||||
|
|
|
@ -442,8 +442,8 @@ enum ruby_special_consts {
|
||||||
#endif
|
#endif
|
||||||
#define SYMBOL_FLAG RUBY_SYMBOL_FLAG
|
#define SYMBOL_FLAG RUBY_SYMBOL_FLAG
|
||||||
|
|
||||||
#define RTEST(v) (((VALUE)(v) & ~Qnil) != 0)
|
#define RTEST(v) !(((VALUE)(v) & ~Qnil) == 0)
|
||||||
#define NIL_P(v) ((VALUE)(v) == Qnil)
|
#define NIL_P(v) !((VALUE)(v) != Qnil)
|
||||||
|
|
||||||
#define CLASS_OF(v) rb_class_of((VALUE)(v))
|
#define CLASS_OF(v) rb_class_of((VALUE)(v))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue