33件ヒット
[1-33件を表示]
(0.081秒)
検索結果
-
Kernel
$ $ , -> String | nil (21201.0) -
デフォルトの出力フィールド区切り文字列です。 Array#join で引数を省略した場合と、 Kernel.#print の各引数の間で出力されます。
...引数を省略した場合と、
Kernel.#print の各引数の間で出力されます。
デフォルト値は nil で、空文字列と同じ結果になります。
Ruby 2.7からは nil 以外に変更することは非推奨になったため、
nil 以外を代入すると警告がでるよ... -
Kernel
. # print(*arg) -> nil (3106.0) -
引数を順に標準出力 $stdout に出力します。引数が与えられない時には変数 $_ の値を出力します。
...変換してから出力します。
変数 $, (出力フィールドセパレータ)に nil で
ない値がセットされている時には、各引数の間にその文字列を出力します。
変数 $\ (出力レコードセパレータ)に nil でな
い値がセットされている時に......た場合に発生します。
//emlist[例][ruby]{
print "Hello, world!"
print "Regexp is",/ant/
print nil
print "\n"
#=> Hello, world!Regexp is(?-mix:ant)
$_ = "input"
$, = "<and>"
$\ = "<end>\n"
print
print "AA","BB"
#=> input<end>
#=> AA<and>BB<end>
//}
@see Kernel.#puts,Kernel.#p,IO#print... -
字句構造 (3006.0)
-
字句構造 * identifier * comment * embed * reserved
...ruby_is_simple
Rubyの識別子は英文字またはアンダースコア('_')か
ら始まり、英文字、アンダースコア('_')または数字
からなります。識別子の長さに制限はありません。
===[a:comment] コメント
例:
# this is a comment line
スク......します。
===[a:embed] 埋め込みドキュメント
例:
=begin
the everything between a line beginning with `=begin' and
that with `=end' will be skipped by the interpreter.
=end
Rubyのソースコードにドキュメントを埋め込む事がで......__LINE__
begin else in rescue undef __FILE__
break elsif module retry unless __ENCODING__
case end next return until
予約語はクラス名、変数名などに用いることはできません。ただし
接頭辞$, @...