るりまサーチ

最速Rubyリファレンスマニュアル検索!
336件ヒット [301-336件を表示] (0.042秒)
トップページ > クエリ:ruby[x] > クエリ:Ruby[x] > モジュール:Kernel[x] > クエリ:puts[x] > 種類:モジュール関数[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

<< < ... 2 3 4 >>

Kernel.#test(cmd, file1, file2) -> bool (22.0)

2ファイル間のファイルテストを行います。

...ファイル1とファイル2が同一のファイルである

//emlist[例][ruby]{
IO.write("testfile1", "test1")
IO.write("testfile2", "test2")
%w(= < > -).each do |e|
result = test(e, "testfile1", "testfile2")
puts
"#{e}: #{result}"
end
//}

# => =: true
# => <: false
# => >: false
# => -: f...

Kernel.#print(*arg) -> nil (20.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...

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

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

...Time
: ?A
ファイルの最終アクセス時刻を返す -> Time
: ?C
ファイルの inode 変更時刻を返す -> Time

//emlist[例][ruby]{
IO.write("testfile", "test")
test("r", "testfile") # => true
test("s", "testfile") # => 4
test("M", "testfile") # => 2018-03-31 07:38:40 +0900
//...
<< < ... 2 3 4 >>