るりまサーチ

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

キーワード

検索結果

<< < ... 3 4 5 6 7 ... > >>

Kernel$$INPUT_LINE_NUMBER -> Integer (27107.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$$INPUT_RECORD_SEPARATOR -> String | nil (27107.0)

$/ の別名

...$/ の別名

require "English"

$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p
array #=> ["ugo|", "ego|", "fogo\n"]

__END__
ugo|ego|fogo...

Kernel$$LAST_PAREN_MATCH -> String | nil (27107.0)

$+ の別名

...r1 = Regexp.compile("<img src=(http:.+?)>")
r2 = Regexp.compile("<a href=(http|ftp).+?>(.+?)</a>")

while line = DATA.gets
[ r1, r2 ].each {|rep|
rep =~ line
p
$+
}
end
__END__
<tr> <td><img src=http://localhost/a.jpg></td> <td>ikkou</td> <td><a href=http://localhost...
.../link.html>link</a></td> </tr>
#enf of sample.rb

$ ruby sample.rb
"http://localhost/a.jpg"
"link"...

Kernel$$PID -> Integer (27107.0)

$$ の別名

...$$ の別名

require "English"

p
sprintf("something%s", $PID) #=> "something5543" など...

Kernel$$POSTMATCH -> String | nil (27107.0)

$' の別名

...$' の別名

require "English"

str = 'hoge,foo,bar,hee,hoo'

/foo/ =~ str
p
$POSTMATCH #=> ",bar,hee,hoo"...

絞り込み条件を変える

Kernel$$PREMATCH -> String | nil (27107.0)

$` の別名

...$` の別名

require "English"

str = 'hoge,foo,bar,hee,hoo'

/foo/ =~ str
p
$PREMATCH #=> "hoge,"...

Kernel$$PROCESS_ID -> Integer (27107.0)

$$ の別名

...$$ の別名

require "English"

p
sprintf("something%s", $PID) #=> "something5543" など...

Kernel.#loop -> Enumerator (27107.0)

(中断されない限り)永遠にブロックの評価を繰り返します。 ブロックが指定されなければ、代わりに Enumerator を返します。

...れば、代わりに Enumerator を返します。

//emlist[例][ruby]{
loop do
p
rint "Input: "
line = gets
break if !line or line =~ /^qQ/
# ...
end
//}

与えられたブロック内で StopIteration を Kernel.#raise すると
ループを終了して nil を返します。
ループ...
...れば、代わりに Enumerator を返します。

//emlist[例][ruby]{
loop do
p
rint "Input: "
line = gets
break if !line or line =~ /^qQ/
# ...
end
//}

与えられたブロック内で StopIteration を Kernel.#raise すると
ループを終了して Enumerator が最後に返した...
...
ループを終了させる場合、通常は break を使用してください。

//emlist[例][ruby]{
enum = Enumerator.new { |y|
y << "one"
y << "two"
:ok
}

result = loop {
p
uts enum.next
} # => :ok
//}


@return break の引数など、ループ脱出時の値を返します。...

Kernel.#loop { ... } -> object | nil (27107.0)

(中断されない限り)永遠にブロックの評価を繰り返します。 ブロックが指定されなければ、代わりに Enumerator を返します。

...れば、代わりに Enumerator を返します。

//emlist[例][ruby]{
loop do
p
rint "Input: "
line = gets
break if !line or line =~ /^qQ/
# ...
end
//}

与えられたブロック内で StopIteration を Kernel.#raise すると
ループを終了して nil を返します。
ループ...
...れば、代わりに Enumerator を返します。

//emlist[例][ruby]{
loop do
p
rint "Input: "
line = gets
break if !line or line =~ /^qQ/
# ...
end
//}

与えられたブロック内で StopIteration を Kernel.#raise すると
ループを終了して Enumerator が最後に返した...
...
ループを終了させる場合、通常は break を使用してください。

//emlist[例][ruby]{
enum = Enumerator.new { |y|
y << "one"
y << "two"
:ok
}

result = loop {
p
uts enum.next
} # => :ok
//}


@return break の引数など、ループ脱出時の値を返します。...

Kernel#cpp_command(outfile, opt = "") -> String (27101.0)

実際にプリプロセッサを実行する際に使用するコマンドを返します。

...実際にプリプロセッサを実行する際に使用するコマンドを返します。

@param outfile 出力ファイルの名前を指定します。

@param opt プリプロセッサに与える追加のコマンドライン引数を指定します。

@see RbConfig.expand...

絞り込み条件を変える

<< < ... 3 4 5 6 7 ... > >>