るりまサーチ

最速Rubyリファレンスマニュアル検索!
180件ヒット [101-180件を表示] (0.104秒)

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. kernel p
  5. kernel $-p

ライブラリ

クラス

モジュール

キーワード

検索結果

<< < 1 2 >>

File#flock(operation) -> 0 | false (119.0)

ファイルをロックします。

...す。

@param operation ロックに対する操作の種類を示す定数を指定します。
どのような定数が利用可能かは以下を参照して下さい。

@raise IOError 自身が close されている場合に発生します。

@raise Errno::EXXX operation に...
...な整数を与えた場合などに発生します。

引数 operation に有効な定数は以下の通りです。定数は File::Constants で定義されていますが、
File クラスの親クラスの IO が File::Constants をインクルードしているので、
これらの定数は F...
...けません。
File.open("counter", File::RDWR|File::CREAT, 0644) {|f|
f.flock(File::LOCK_EX)
value = f.read.to_i + 1
f.rewind
f.write("#{value}\n")
f.flush
f.truncate(f.pos)
}

# 読み込みロック(read lock)を使用してカウンタを読み込み。
File.open("counter", "r") {|f...

Kernel#convertible_int(type, headers = nil, opts = nil) (117.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

...type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are passed as preprocessor constants t...
...o the
compiler using the +type+ name, in uppercase.

* 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X'
is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP,
where 'TYP' is the +type+ name in uppercase with replacing '_t'
suffix with 'T', followed by '=X' whe...
...re 'X' is the macro name to
convert +type+ to +Integer+ object, and vice versa.

For example, if foobar_t is defined as unsigned long, then
convertible_int("foobar_t") would return "unsigned long", and define
macros:

#define TYPEOF_FOOBAR_T unsigned long
#define FOOBART2NUM ULONG2NUM...

Kernel#convertible_int(type, headers = nil, opts = nil) { ... } (117.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

...type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are passed as preprocessor constants t...
...o the
compiler using the +type+ name, in uppercase.

* 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X'
is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP,
where 'TYP' is the +type+ name in uppercase with replacing '_t'
suffix with 'T', followed by '=X' whe...
...re 'X' is the macro name to
convert +type+ to +Integer+ object, and vice versa.

For example, if foobar_t is defined as unsigned long, then
convertible_int("foobar_t") would return "unsigned long", and define
macros:

#define TYPEOF_FOOBAR_T unsigned long
#define FOOBART2NUM ULONG2NUM...

Win32::Registry#read(name, *rtype) (107.0)

@todo

...[ type, data ]
の配列で返します。
name が nil の場合,(標準) レジストリ値が読み込まれます。

type はレジストリ値の型です。(⇒Win32::Registry::Constants)
data はレジストリ値のデータで,クラスは以下の通りです:
* REG_SZ, REG_EXPAND_S...
...WORD
Integer
* REG_BINARY
String (バイナリデータを含みます)

オプション引数 rtype が指定されていた場合,レジストリ値の型が
与えられた rtype の配列に存在するかチェックされ,存在しない場合に
TypeError が発生します。...
...nteger
* REG_BINARY, REG_NONE
String (バイナリデータを含みます)

オプション引数 rtype が指定されていた場合,レジストリ値の型が
与えられた rtype の配列に存在するかチェックされ,存在しない場合に
TypeError が発生します。...

Win32::Registry#write(name, type, data) (107.0)

@todo

...@todo

レジストリ値 name に型 type で data を書き込みます。
name が nil の場合,(標準) レジストリ値に書き込みます。

type はレジストリ値の型です。(⇒Win32::Registry::Constants)
data のクラスは Win32::Registry#read
メソッドに準じていな...

絞り込み条件を変える

Socket::AncillaryData#unix_rights -> [IO] | nil (49.0)

Unix domain socket の SCM_RIGHTS 制御メッセージに含まれる ファイルディスクリプタを IO オブジェクトの配列として返します。

...UNIXSocket.pair
p
s1 #=> #<UNIXSocket:fd 3>
s1.sendmsg "stdin and a socket", 0, nil, Socket::AncillaryData.unix_rights(STDIN, s1)
_, _, _, ctl = s2.recvmsg(:scm_rights=>true)
p
ctl
#=> #<Socket::AncillaryData: UNIX SOCKET RIGHTS 6 7>
p
ctl.unix_ri...
...#=> [#<IO:fd 6>, #<Socket:fd 7>]
p
File.identical?(STDIN, ctl.unix_rights[0]) #=> true
p
File.identical?(s1, ctl.unix_rights[1]) #=> true

# If :scm_rights=>true is not given, unix_rights returns nil
s1, s2 = UNIXSocket.pair
s1.sendmsg "stdin and a socket", 0, nil, So...
...yData.unix_rights(STDIN, s1)
_, _, _, ctl = s2.recvmsg
p
ctl #=> #<Socket::AncillaryData: UNIX SOCKET RIGHTS 6 7>
p
ctl.unix_rights #=> nil


@raise TypeError family/level/type が AF_UNIX/SOL_SOCKET/SCM_RIGHTS でない場合
に発生します。
@see Socket::Constants::SCM_RIGHTS...

Object#instance_variables -> [Symbol] (19.0)

オブジェクトのインスタンス変数名をシンボルの配列として返します。

...列として返します。

//emlist[][ruby]{
obj = Object.new
obj.instance_eval { @foo, @bar = nil }
p
obj.instance_variables

#=> [:@foo, :@bar]
//}

@see Object#instance_variable_get, Kernel.#local_variables, Kernel.#global_variables, Module.constants, Module#constants, Module#class_variables...
<< < 1 2 >>