るりまサーチ

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

別のキーワード

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

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

Kernel.#test(cmd, file) -> bool | Time | Integer | nil (312.0)

単体のファイルでファイルテストを行います。

...z
ファイルサイズが 0 である
: ?s
ファイルサイズが 0 でない (ファイルサイズを返す、0 ならば nil) -> Integer|nil
: ?f
ファイルはプレーンファイルである
: ?d
ファイルはディレクトリである
: ?l
ファイルはシンボ...

Kernel#arg_config(config, default) { ... } -> object | String | true | nil (304.0)

configure オプション --config の値を返します。

configure オプション --config の値を返します。

@param config オプションを文字列で指定します。

@param default 引数 config で指定したオプションのデフォルト値を指定します。

@return オプションが指定されてた場合は true を、指定されなかった場合は
nil を返します。
引数 default、あるいはブロックを指定すると、オプションが指定さ
れていない場合に引数 default の値かブロックの評価結果を返します
(両方指定した場合はブロックが優先されます)...

Kernel.#open(name, mode = &#39;r&#39;, perm = nil, options = {}) -> StringIO | Tempfile | IO (222.0)

name が http:// や ftp:// で始まっている文字列なら URI のリソースを 取得した上で StringIO オブジェクトまたは Tempfile オブジェクトとして返します。 返されるオブジェクトは OpenURI::Meta モジュールで extend されています。

...ock) のように name の open メソッドが呼ばれます。

これ以外の場合は、name はファイル名として扱われ、従来の
Kernel
.#open(name, *rest) が呼ばれます。

ブロックを与えた場合は上の場合と同様、name が http:// や ftp:// で
始まって...
...ram mode モードを文字列で与えます。Kernel.#open と同じです。

@param perm open(2) の第 3 引数のように、ファイルを生成する場合のファイルのパーミッションを
整数で指定します。Kernel.#open と同じです

@param options ハッシ...
...ブクラスが発生します。詳しくは net/ftp
を参照して下さい。

例:

require 'open-uri'
sio = open('http://www.example.com') { |sio|
p sio.is_a?(OpenURI::Meta) # => true
p sio.content_type
puts sio.read
}

@see OpenURI.open_uri, URI.open...
...uby2.7以降、open-uriにより拡張されたKernel.openでURLを開くときにwarningが表示されるようになりました。

require 'open-uri'
open("http://www.ruby-lang.org/") {|f|
# ...
}
#=> warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or...

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (205.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

Kernel#check_signedness(type, headers = nil, opts = nil) { ... } -> "signed" | "unsigned" | nil (205.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

絞り込み条件を変える

Kernel$$-F -> Regexp | String | nil (205.0)

String#split で引数を省略した場合の区切り文字です。

String#split で引数を省略した場合の区切り文字です。

Ruby 2.7からは nil 以外に変更することは非推奨になったため、
nil 以外を代入すると警告がでるようになりました。

nilを設定すると特殊な分割を行います。
詳細は String#split を参照してください。

コマンドラインオプション -F を指定して Ruby を起動した場合、
初期値は -F で指定した値です。
それ以外の時には初期値は nil です。

$; には任意のオブジェクトを代入できます。
ただし、String#split の仕様変更を考慮すると
常に正規表現を指定すべきです。

Ruby ...

Kernel$$; -> Regexp | String | nil (205.0)

String#split で引数を省略した場合の区切り文字です。

String#split で引数を省略した場合の区切り文字です。

Ruby 2.7からは nil 以外に変更することは非推奨になったため、
nil 以外を代入すると警告がでるようになりました。

nilを設定すると特殊な分割を行います。
詳細は String#split を参照してください。

コマンドラインオプション -F を指定して Ruby を起動した場合、
初期値は -F で指定した値です。
それ以外の時には初期値は nil です。

$; には任意のオブジェクトを代入できます。
ただし、String#split の仕様変更を考慮すると
常に正規表現を指定すべきです。

Ruby ...

Kernel.#trap(signal) { ... } -> String | Proc | nil (205.0)

signal で指定された割り込みにたいするハンドラとして command を登録します。Signal.#trapと同じです。

signal で指定された割り込みにたいするハンドラとして
command を登録します。Signal.#trapと同じです。

Signal.#trapの使用を推奨します。

@param signal Signal.#trap 参照
@param command Signal.#trap 参照


@see Signal.#trap,Signal

Kernel.#trap(signal, command) -> String | Proc | nil (205.0)

signal で指定された割り込みにたいするハンドラとして command を登録します。Signal.#trapと同じです。

signal で指定された割り込みにたいするハンドラとして
command を登録します。Signal.#trapと同じです。

Signal.#trapの使用を推奨します。

@param signal Signal.#trap 参照
@param command Signal.#trap 参照


@see Signal.#trap,Signal
<< 1 2 3 ... > >>