るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.068秒)
トップページ > クエリ:|[x] > クエリ:-[x] > クエリ:param[x] > モジュール:Etc[x]

別のキーワード

  1. _builtin |
  2. ipaddr |
  3. set |
  4. array |
  5. integer |

ライブラリ

キーワード

検索結果

Etc.#confstr(name) -> String | nil (214.0)

confstr(3) で取得したシステム設定変数の値を返します。

...@param name Etc モジュールの CS_ で始まる定数のいずれかを指定します。

引数 name に対応する設定が行われていない状態の場合は nil を返します。
(confstr(3) が -1 を返し、errno が設定されていない場合)

//emlist[][ruby]{
require "etc"...
...Etc.confstr(Etc::CS_PATH) # => "/bin:/usr/bin"

# GNU/Linux
Etc
.confstr(Etc::CS_GNU_LIBC_VERSION) # => "glibc 2.18"
Etc
.confstr(Etc::CS_GNU_LIBPTHREAD_VERSION) # => "NPTL 2.18"
//}...

Etc.#sysconf(name) -> Integer | nil (214.0)

sysconf(3) で取得したシステム設定変数の値を返します。

... -1 を返し、errno が設定されていない
場合)

@param name Etc モジュールの SC_ で始まる定数のいずれかを指定します。

//emlist[][ruby]{
require "etc"
Etc
.sysconf(Etc::SC_ARG_MAX) # => 2097152

# Number of processors.
# It is not standardized.
Etc
.sysconf(Etc::S...