るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
29件ヒット [1-29件を表示] (0.042秒)
トップページ > バージョン:2.1.0[x] > クエリ:kernel[x] > クエリ:constants[x]

別のキーワード

  1. kernel spawn
  2. kernel system
  3. kernel exec
  4. kernel open
  5. kernel fail

検索結果

Module#constants(inherit = true) -> [Symbol] (54520.0)

そのモジュール(またはクラス)で定義されている定数名の配列を返します。

そのモジュール(またはクラス)で定義されている定数名の配列を返します。

inherit に真を指定すると
スーパークラスやインクルードしているモジュールの定数も含みます。
Object のサブクラスの場合、Objectやそのスーパークラスで定義されている
定数は含まれません。 Object.constants とすると Object クラスで定義された
定数の配列が得られます。

得られる定数の順序は保証されません。

@param inherit true を指定するとスーパークラスや include したモジュールで
定義された定数が対象にはなります。false を指定し...

Module.constants -> [Symbol] (54376.0)

このメソッドを呼び出した時点で参照可能な定数名の配列を返します。

このメソッドを呼び出した時点で参照可能な定数名の配列を返します。

//emlist[例][ruby]{
class C
FOO = 1
end
p Module.constants # => [:RUBY_PLATFORM, :STDIN, ..., :C, ...]
# 出力中に :FOO は現われない
//}

@see Module#constants, Kernel.#local_variables, Kernel.#global_variables, Object#instance_variables, Module#class_...

Kernel.#spawn(env, program, *args, options={}) -> Integer (27061.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

引数を外部コマンドとして実行しますが、生成した
子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

env に Hash を渡すことで、exec(2) で子プロセス内で
ファイルを実行する前に環境変数を変更することができます。
Hash のキーは環境変数名文字列、Hash の値に設定する値とします。
nil とすることで環境変数が削除(unsetenv(3))されます。
//emlist[例][ruby]{
# FOO を BAR にして BAZ を削除する
pid = spawn({"FOO"=>"BAR", "BAZ"=>nil}, command)
//...

Kernel.#spawn(program, *args) -> Integer (27061.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

引数を外部コマンドとして実行しますが、生成した
子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

env に Hash を渡すことで、exec(2) で子プロセス内で
ファイルを実行する前に環境変数を変更することができます。
Hash のキーは環境変数名文字列、Hash の値に設定する値とします。
nil とすることで環境変数が削除(unsetenv(3))されます。
//emlist[例][ruby]{
# FOO を BAR にして BAZ を削除する
pid = spawn({"FOO"=>"BAR", "BAZ"=>nil}, command)
//...

Kernel.#global_variables -> [Symbol] (27055.0)

プログラム中で定義されているグローバル変数(`$'で始まる変数)名の 配列を返します。

プログラム中で定義されているグローバル変数(`$'で始まる変数)名の
配列を返します。

//emlist[例][ruby]{
p global_variables #=> [:$;, :$-F, :$@, ... ]
//}

@see Kernel.#local_variables,Object#instance_variables,Module.constants,Module#constants,Module#class_variables

絞り込み条件を変える

Kernel.#local_variables -> [Symbol] (27055.0)

現在のスコープで定義されているローカル変数名の配列を返します。

現在のスコープで定義されているローカル変数名の配列を返します。

//emlist[例][ruby]{
yuyu = 0
p local_variables #=> [:yuyu]
//}

@see Kernel.#global_variables,Object#instance_variables,Module.constants,Module#constants,Module#class_variables

Kernel#convertible_int(type, headers = nil, opts = nil) (27049.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

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 p...

Kernel#convertible_int(type, headers = nil, opts = nil) { ... } (27049.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

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 p...

Kernel.#spawn(command, options={}) -> Integer (27046.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

引数を外部コマンドとして実行しますが、生成した
子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。


=== 引数の解釈

この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。


@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash...

Kernel.#spawn(env, command, options={}) -> Integer (27046.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

引数を外部コマンドとして実行しますが、生成した
子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。


=== 引数の解釈

この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。


@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash...

絞り込み条件を変える

Kernel.#open(file, mode_enc = "r", perm = 0666) -> IO (27019.0)

file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。

file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。

ブロックが与えられた場合、指定されたファイルをオープンし、
生成した IO オブジェクトを引数としてブロックを実行します。
ブロックの終了時や例外によりブロックを脱出するとき、
ファイルをクローズします。ブロックを評価した結果を返します。

ファイル名 file が `|' で始まる時には続く文字列をコマンドとして起動し、
コマンドの標準入出力に対してパイプラインを生成します

ファイル名が "|-" である時、open は Ruby の子プロセス
を生成し、その子プロセスとの間のパイプ(IOオブジェクト)を...

Kernel.#open(file, mode_enc = "r", perm = 0666) {|io| ... } -> object (27019.0)

file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。

file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。

ブロックが与えられた場合、指定されたファイルをオープンし、
生成した IO オブジェクトを引数としてブロックを実行します。
ブロックの終了時や例外によりブロックを脱出するとき、
ファイルをクローズします。ブロックを評価した結果を返します。

ファイル名 file が `|' で始まる時には続く文字列をコマンドとして起動し、
コマンドの標準入出力に対してパイプラインを生成します

ファイル名が "|-" である時、open は Ruby の子プロセス
を生成し、その子プロセスとの間のパイプ(IOオブジェクト)を...

Socket::Constants::SO_ATTACH_FILTER -> Integer (9055.0)

Attach socket filter。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Attach socket filter。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see socket(7linux), http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/networking/filter.txt;hb=HEAD,
Socket::Constants::SOL_SOCKET

Socket::Constants::SO_DETACH_FILTER -> Integer (9055.0)

Detach socket filter。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Detach socket filter。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see socket(7linux), http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/networking/filter.txt;hb=HEAD,
Socket::Constants::SOL_SOCKET

Socket::Constants::AI_V4MAPPED_CFG -> Integer (9049.0)

Accept IPv4 mapped addresses if the kernel supports it。

Accept IPv4 mapped addresses if the kernel supports it。

Socket.getaddrinfo, Addrinfo.getaddrinfo の引数 flags に渡す
定数です。

@see getipnodebyname(3freebsd)

絞り込み条件を変える

Socket::Constants::SO_NKE -> Integer (9049.0)

@todo socket-level Network Kernel Extension。

@todo
socket-level Network Kernel Extension。

NEWS for Ruby 2.0.0 (289.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

NEWS for Ruby 2.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 1.9.3 以降の変更

=== 言語仕様の変更

* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加しました。(%w, %W に似ています)
* デフォルトのソースエンコーディングを US-ASCI...

ruby 1.6 feature (109.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

ruby 1.6 feature
ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。

((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

== 1.6.8 (2002-12-24) -> stable-snapshot

: 2003-01-22: errno

EAGAIN と EWOULDBLOCK が同じ値のシステムで、EWOULDBLOCK がなくなっ
ていま...

クラス/メソッドの定義 (109.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

クラス/メソッドの定義
* クラス/メソッドの定義:
* class
* singleton_class
* module
* method
* operator
* nest_method
* eval_method
* singleton_method
* class_method
* limit
* 定義に関する操作:
* alias
* undef
* defined

===[a:class] クラス定義

//emlist[例][ruby]{
class Foo < S...

Module#class_variables(inherit = true) -> [Symbol] (73.0)

クラス/モジュールに定義されているクラス変数の名前の配列を返します。

クラス/モジュールに定義されているクラス変数の名前の配列を返します。

@param inherit false を指定しない場合はスーパークラスやインクルードして
いるモジュールのクラス変数を含みます。

//emlist[例][ruby]{
class One
@@var1 = 1
end
class Two < One
@@var2 = 2
end
One.class_variables # => [:@@var1]
Two.class_variables # => [:@@var2, :@@var1]
Two.class_va...

絞り込み条件を変える

Object#instance_variables -> [Symbol] (73.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_variabl...

Syslog.#log(priority, format, *arg) -> self (73.0)

syslogにメッセージを書き込みます。

syslogにメッセージを書き込みます。

priority は優先度を示す定数(Syslog::Constants参照)です。
また、facility(Syslog::Constants参照)を論理和で指定す
ることで open で指定した facility を切替えることもできます。

format 以降は Kernel.#sprintf と同じ形式の引数を指定します。

但し、syslog(3) のように format に %m は使用できません。

メッセージに改行を含める必要はありません。

@param priority priority は優先度を示す定数を指定します。
...

IO.for_fd(fd, mode = "r", **opts) -> IO (55.0)

オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。

オープン済みのファイルディスクリプタ fd に対する新しい
IO オブジェクトを生成して返します。

IO.open にブロックが与えられた場合、IO オブジェクトを生成しそれを引数としてブロックを
実行します。ブロックの終了とともに fd はクローズされます。ブロックの結果を返します。
IO.new, IO.for_fd はブロックを受け付けません。

=== キーワード引数
このメソッドは以下のキーワード引数を利用できます。
* :mode mode引数と同じ意味です
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
...

IO.new(fd, mode = "r", **opts) -> IO (55.0)

オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。

オープン済みのファイルディスクリプタ fd に対する新しい
IO オブジェクトを生成して返します。

IO.open にブロックが与えられた場合、IO オブジェクトを生成しそれを引数としてブロックを
実行します。ブロックの終了とともに fd はクローズされます。ブロックの結果を返します。
IO.new, IO.for_fd はブロックを受け付けません。

=== キーワード引数
このメソッドは以下のキーワード引数を利用できます。
* :mode mode引数と同じ意味です
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
...

IO.open(fd, mode = "r", **opts) -> IO (55.0)

オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。

オープン済みのファイルディスクリプタ fd に対する新しい
IO オブジェクトを生成して返します。

IO.open にブロックが与えられた場合、IO オブジェクトを生成しそれを引数としてブロックを
実行します。ブロックの終了とともに fd はクローズされます。ブロックの結果を返します。
IO.new, IO.for_fd はブロックを受け付けません。

=== キーワード引数
このメソッドは以下のキーワード引数を利用できます。
* :mode mode引数と同じ意味です
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
...

絞り込み条件を変える

IO.open(fd, mode = "r", **opts) {|io| ... } -> object (55.0)

オープン済みのファイルディスクリプタ fd に対する新しい IO オブジェクトを生成して返します。

オープン済みのファイルディスクリプタ fd に対する新しい
IO オブジェクトを生成して返します。

IO.open にブロックが与えられた場合、IO オブジェクトを生成しそれを引数としてブロックを
実行します。ブロックの終了とともに fd はクローズされます。ブロックの結果を返します。
IO.new, IO.for_fd はブロックを受け付けません。

=== キーワード引数
このメソッドは以下のキーワード引数を利用できます。
* :mode mode引数と同じ意味です
* :external_encoding 外部エンコーディング。"-" はデフォルト外部エンコーディングの
...

Socket::SO_ATTACH_FILTER -> Integer (55.0)

Attach socket filter。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Attach socket filter。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see socket(7linux), http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/networking/filter.txt;hb=HEAD,
Socket::Constants::SOL_SOCKET

Socket::SO_DETACH_FILTER -> Integer (55.0)

Detach socket filter。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Detach socket filter。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see socket(7linux), http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/networking/filter.txt;hb=HEAD,
Socket::Constants::SOL_SOCKET

File (37.0)

ファイルアクセスのためのクラスです。

ファイルアクセスのためのクラスです。

通常 Kernel.#open または File.open を使って生成します。
IO クラスがインクルードしている File::Constants は File クラスに関係する定数を
格納したモジュールです。
また File::Stat は stat 構造体( stat(2) 参照)を表すクラスです。