mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert "[DOC] Mention RBOOL in extension.rdoc [Feature #13125]"
This reverts commit 9ad34da47f
, as
`RBOOL` is not defined publicly yet.
This commit is contained in:
parent
b43ad6b802
commit
65a8d52212
2 changed files with 0 additions and 30 deletions
|
@ -190,21 +190,6 @@ INT2NUM() :: 任意の整数からVALUEへ
|
||||||
INT2NUM()は整数がFIXNUMの範囲に収まらない場合,Bignumに変換
|
INT2NUM()は整数がFIXNUMの範囲に収まらない場合,Bignumに変換
|
||||||
してくれます(が,少し遅い).
|
してくれます(が,少し遅い).
|
||||||
|
|
||||||
Cの真偽値をRubyの +true+ または +false+ に変換する
|
|
||||||
|
|
||||||
RBOOL() ::
|
|
||||||
|
|
||||||
<code>RBOOL(v)</code> は _v_ が非0のとき +Qtrue+ ,それ以外
|
|
||||||
の _v_ が0のとき +Qfalse+ を返します.
|
|
||||||
|
|
||||||
注意: RBOOLは定義されているのはRuby 3.1以降なので,それより
|
|
||||||
古いバージョンをサポートするプログラム中で使いたいときは,以
|
|
||||||
下のような定義を追加しておく必要があるでしょう.
|
|
||||||
|
|
||||||
#ifndef RBOOL
|
|
||||||
#define RBOOL(v) ((v) ? Qtrue : Qfalse)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
=== Rubyのデータを操作する
|
=== Rubyのデータを操作する
|
||||||
|
|
||||||
先程も述べた通り,Rubyの構造体をアクセスする時に内容の更新を
|
先程も述べた通り,Rubyの構造体をアクセスする時に内容の更新を
|
||||||
|
|
|
@ -169,21 +169,6 @@ INT2NUM() :: for arbitrary sized integers.
|
||||||
INT2NUM() converts an integer into a Bignum if it is out of the FIXNUM
|
INT2NUM() converts an integer into a Bignum if it is out of the FIXNUM
|
||||||
range, but is a bit slower.
|
range, but is a bit slower.
|
||||||
|
|
||||||
To convert C boolean to Ruby +true+ or +false+ :
|
|
||||||
|
|
||||||
RBOOL() ::
|
|
||||||
|
|
||||||
<code>RBOOL(v)</code> returns +Qtrue+ if _v_ is not 0, or +Qfalse+
|
|
||||||
otherwisze _v_ is 0.
|
|
||||||
|
|
||||||
Notice: RBOOL is defined since Ruby 3.1, if you want to use it in a
|
|
||||||
program which supports older versions, the fallback definition will be
|
|
||||||
needed, like as the following.
|
|
||||||
|
|
||||||
#ifndef RBOOL
|
|
||||||
#define RBOOL(v) ((v) ? Qtrue : Qfalse)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
=== Manipulating Ruby Data
|
=== Manipulating Ruby Data
|
||||||
|
|
||||||
As I already mentioned, it is not recommended to modify an object's
|
As I already mentioned, it is not recommended to modify an object's
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue