るりまサーチ

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

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n
  3. rsa n=
  4. openssl n
  5. openssl n=

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Kernel (44000.0)

全てのクラスから参照できるメソッドを定義しているモジュール。 Object クラスはこのモジュールをインクルードしています。

全てのクラスから参照できるメソッドを定義しているモジュール。
Object クラスはこのモジュールをインクルードしています。

Object クラスのメソッドは実際にはこのモジュールで定義されていま
す。これはトップレベルでのメソッドの再定義に対応するためです。

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (36400.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_O...
...F_', followed by the +type+
n
ame, 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 preprocesso...
...r macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
done....

Kernel#check_signedness(type, headers = nil, opts = nil) { ... } -> "signed" | "unsigned" | nil (36400.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_O...
...F_', followed by the +type+
n
ame, 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 preprocesso...
...r macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
done....

Kernel.#readlines(rs = $/) -> [String] (30260.0)

ARGFを Kernel.#gets(rs) でEOFまで読み込んで、その各行を要素としてもつ配列を返します。 行の区切りは引数 rs で指定した文字列になります。

...ARGFを Kernel.#gets(rs) でEOFまで読み込んで、その各行を要素としてもつ配列を返します。
行の区切りは引数 rs で指定した文字列になります。

rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続...
...rno::EXXX 読み込みに失敗した場合に発生します。

//emlist[main.rb][ruby]{
ARGV << 'b.txt' << 'b.txt'
p readlines #=> ["hello\n", "it\n", "\n", "common\n", "hello\n", "it\n", "\n", "common\n"]

ARGV << 'b.txt' << 'b.txt'
p readlines(nil) #=> ["hello\nit\n\ncommon\n", "hello\ni...
...t\n\ncommon\n"]

ARGV << 'b.txt' << 'b.txt'
p readlines("") #=> ["hello\nit\n\n", "common\n", "hello\nit\n\n", "common\n"]

ARGV << 'b.txt' << 'b.txt'
p readlines('it') #=> ["hello\nit", "\n\ncommon\n", "hello\nit", "\n\ncommon\n"]
p readlines #=> []
//}

//emlist[b.txt][ruby]{
hello
it

com...

Kernel.#readline(rs = $/) -> String (30148.0)

ARGFから一行読み込んで、それを返します。 行の区切りは引数 rs で指定した文字列になります。

...ARGFから一行読み込んで、それを返します。
行の区切りは引数 rs で指定した文字列になります。

rs に nil を指定すると行区切りなしとみなしてファイルの内容を
すべて読み込みます。ARGVに複数のファイル名が存在する場...
...ise Errno::EXXX 読み込みに失敗した場合に発生します。
@raise EOFError readline でファイル末端(EOF)を検出すると発生します。

//emlist[例][ruby]{
# ---main.rb---
ARGV << 'b.txt' << 'c.txt'
p readline #=> "hello\n"
p readline(nil) #=> "it\ncommon\n"
p readline("") #...
...t ---
hello
it
common
# --- c.txt ---
ARGF
# スクリプトに指定した引数 (Object::ARGV を参照) をファイル名と
# みなして、それらのファイルを連結した 1 つの仮想ファイルを表すオブジェクトです。
//}


@see $/,ARGF,Kernel.#readlines,Kernel.#gets...

絞り込み条件を変える

Kernel$$LAST_READ_LINE -> String | nil (30130.0)

$_ の別名

...$_ の別名

1 e
2 f
3 g
4 h
5 i
# end of a.txt

ruby -rEnglish -ne'p $LAST_READ_LINE' a.txt
#=>
"1 e\n"
"2 f\n"
"3 g\n"
"4 h\n"
"5 i\n"...

Kernel$$INPUT_LINE_NUMBER -> Integer (30100.0)

$. の別名

...$. の別名

1 e
2 f
3 g
4 h
5 i
# end of a.txt

require "English"

File.foreach(ARGV.at(0)){|line|
# read line
}
p $INPUT_LINE_NUMBER
# end of sample.rb

ruby sample.rb a.txt
#=> 5...

Kernel$$NR -> Integer (30100.0)

$. の別名

...$. の別名

1 e
2 f
3 g
4 h
5 i
# end of a.txt

require "English"

File.foreach(ARGV.at(0)){|line|
# read line
}
p $INPUT_LINE_NUMBER
# end of sample.rb

ruby sample.rb a.txt
#=> 5...

Kernel#namespace(name = nil) { ... } -> Rake::NameSpace (27300.0)

新しい名前空間を作成します。

...新しい名前空間を作成します。

与えられたブロックを評価する間は、その名前空間を使用します。

例:
n
s = namespace "nested" do
task :run
end
task_run = ns[:run] # find :run in the given namespace.

@see Rake::TaskManager#in_namespace...
<< 1 2 3 ... > >>