るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

モジュール

キーワード

検索結果

Kernel.#print(*arg) -> nil (26161.0)

引数を順に標準出力 $stdout に出力します。引数が与えられない時には変数 $_ の値を出力します。

...た場合に発生します。

//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...

File::Stat#<=>(o) -> Integer | nil (14112.0)

ファイルの最終更新時刻を比較します。self が other よりも 新しければ正の数を、等しければ 0 を古ければ負の数を返します。 比較できない場合は nil を返します。

...fp1 = Tempfile.open("first")
fp1.print "古い方\n"
sleep(1)
fp2 = Tempfile.open("second")
fp2.print "新しい方\n"

p File::Stat.new(fp1.path) <=> File::Stat.new(fp2.path) #=> -1
p File::Stat.new(fp2.path) <=> File::Stat.new(fp1.path) #=> 1
p File::Stat.new(fp1.path) <=> fp2.path #=> nil
//}...

Integer#downto(min) -> Enumerator (8022.0)

self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。

...で 1 ずつ減らしながらブロックを繰り返し実行します。
self < min であれば何もしません。

@param min 数値
@return self を返します。

//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}

@see Integer#upto, Numeric#step, Integer#times...

Integer#downto(min) {|n| ... } -> self (8022.0)

self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。

...で 1 ずつ減らしながらブロックを繰り返し実行します。
self < min であれば何もしません。

@param min 数値
@return self を返します。

//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}

@see Integer#upto, Numeric#step, Integer#times...