るりまサーチ

最速Rubyリファレンスマニュアル検索!
191件ヒット [1-100件を表示] (0.046秒)

別のキーワード

  1. kernel exec
  2. kernel system
  3. kernel spawn
  4. kernel open
  5. kernel fail

検索結果

<< 1 2 > >>

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

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

...文字列の場合はその先頭の文字だけをコマンドとみなします。
@param file1 テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@param file2 テストするファイルのパスを表す文字列か IO オブジェクトを指定...
...ァイル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
# => -: fals...

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

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

...るいは同じ文字を表す数値
です。文字列の場合はその先頭の文字だけをコマンドとみなします。
@param file テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@return 下表に特に明記していない...
...me
: ?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
//}...

Kernel#create_makefile(target, srcprefix = nil) -> true (27148.0)

@todo

...@todo

Kernel
#have_library などの各種検査の結果を元に、拡張ライブラリを
ビルドするための Makefile を生成します。

extconf.rb は普通このメソッドの呼び出しで終ります。

@param target ターゲットとなる拡張ライブラリの名前を指...
...トリ名と見
なされ、生成された Makefile はそのディレクトリ構造に従い
ます。
例えば、'test/foo' を指定した場合、拡張ライブラリは
'test' ディレクトリにインストールされます。こ...
...の拡張ライブ
ラリを Ruby スクリプトから使用するときは
"require 'test/foo'" とする必要があります。

@param srcprefix ソースコードがあるディレクトリ名を指定します。
省略した場合は extconf.rb...

Shell#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (15373.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...
Kernel
.#test FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@para...
...m file1 文字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"]...
...# => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Shell::CommandProcessor#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (15373.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...
Kernel
.#test FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@para...
...m file1 文字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"]...
...# => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

絞り込み条件を変える

Shell::Filter#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (15373.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...
Kernel
.#test FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@para...
...m file1 文字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"]...
...# => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

File.new(path, mode = "r", perm = 0666) -> File (9209.0)

path で指定されるファイルをオープンし、File オブジェクトを生成して 返します。

...File オブジェクトを生成して
返します。

path が整数の場合はファイルディスクリプタとして扱い、それに対応する
File
オブジェクトを生成して返します。IO.open と同じです。
ブロックを指定して呼び出した場合は、File...
...す。Kernel.#open と同じです。

@param perm ファイルを生成する場合のファイルのパーミッションを整数で指定します。Kernel.#open と同じです。

@raise Errno::EXXX ファイルのオープンに失敗した場合に発生します。

//emlist[例: File.new...
...ァイルオープン][ruby]{
f = File.new("testfile", "r")
f.class # => File
f.close
//}

//emlist[例: File.open による読み込みモードでのファイルオープン][ruby]{
f = File.open("testfile", "r")
f.class # => File
f.close
//}

//emlist[例: File.open による書き込みモード...

File.open(path, mode = "r", perm = 0666) -> File (9209.0)

path で指定されるファイルをオープンし、File オブジェクトを生成して 返します。

...File オブジェクトを生成して
返します。

path が整数の場合はファイルディスクリプタとして扱い、それに対応する
File
オブジェクトを生成して返します。IO.open と同じです。
ブロックを指定して呼び出した場合は、File...
...す。Kernel.#open と同じです。

@param perm ファイルを生成する場合のファイルのパーミッションを整数で指定します。Kernel.#open と同じです。

@raise Errno::EXXX ファイルのオープンに失敗した場合に発生します。

//emlist[例: File.new...
...ァイルオープン][ruby]{
f = File.new("testfile", "r")
f.class # => File
f.close
//}

//emlist[例: File.open による読み込みモードでのファイルオープン][ruby]{
f = File.open("testfile", "r")
f.class # => File
f.close
//}

//emlist[例: File.open による書き込みモード...

File.open(path, mode = "r", perm = 0666) {|file| ... } -> object (9209.0)

path で指定されるファイルをオープンし、File オブジェクトを生成して 返します。

...File オブジェクトを生成して
返します。

path が整数の場合はファイルディスクリプタとして扱い、それに対応する
File
オブジェクトを生成して返します。IO.open と同じです。
ブロックを指定して呼び出した場合は、File...
...す。Kernel.#open と同じです。

@param perm ファイルを生成する場合のファイルのパーミッションを整数で指定します。Kernel.#open と同じです。

@raise Errno::EXXX ファイルのオープンに失敗した場合に発生します。

//emlist[例: File.new...
...ァイルオープン][ruby]{
f = File.new("testfile", "r")
f.class # => File
f.close
//}

//emlist[例: File.open による読み込みモードでのファイルオープン][ruby]{
f = File.open("testfile", "r")
f.class # => File
f.close
//}

//emlist[例: File.open による書き込みモード...

FileTest.#identical?(file1, file2) -> bool (6324.0)

file1 と file2 が同じファイルを指している時に真を返します。 そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。

...
file
1 と file2 が同じファイルを指している時に真を返します。
そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。

ruby 1.8.3 以前ではKernel.#test(?-, file1, file2)を使...
...p File.identical?("a", "a") #=> true
p File.identical?("a", "./a") #=> true
File
.link("a", "b")
p File.identical?("a", "b") #=> true
File
.symlink("a", "c")
p File.identical?("a", "c") #=> true
open("d", "w") {}
p File.identical?("a", "d") #=> false

@param file1...
...ァイル名を表す文字列か IO オブジェクトを指定します。

@param file2 ファイル名を表す文字列か IO オブジェクトを指定します。

@raise IOError 指定された IO オブジェクト file1, file2 が既に close されていた場合に発生します。...

絞り込み条件を変える

Test::Unit.setup_argv(original_argv = ARGV) { |files| ... } -> [String] (3136.0)

original_argvで指定されたオプションを解析して、テスト対象になるファイル をrequireします。

...にあるtest_*.rbを全てrequireします。

このメソッド自体は、オプションを解析してrequireを行う以外の処理は行いま
せんが、test/unit.rbをrequireして呼び出すメソッドのため、結果的にユニッ
トテストが実行されます。testrbコマ...
...使えます。なお、--name=test_fooのような指定は行えません。--name test_foo
のように指定してください。

: -x
指定されたファイルを除外します。ファイルの指定に正規表現も使えます。

: -s, --seed
Kernel
.#rand の乱数の種を指定...
...ess に true を設定します。

: --no-gc-stress

GC.stress に false を設定します。

===== 注意

Test
::Unit.setup_argvはoriginal_argvの指定に関わらず、ARGVをfilesで置き
換えます。置き換えられたARGVはminitest/unitによってもう1度解析されます。...

ruby 1.8.4 feature (540.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...* ((<ruby 1.8.4 feature/test [bug]>))
* ((<ruby 1.8.4 feature/File.identical? [new]>))
* ((<ruby 1.8.4 feature/FileTest.identical? [new]>))
* ((<ruby 1.8.4 feature/File.split [change]>))
* ((<ruby 1.8.4 feature/File.basename [change]>))
* ((<ruby 1.8.4 feature/File.dirname [change]>))
*...
...1.8.4 feature/File.basename (Win全般) [change]>))
* ((<ruby 1.8.4 feature/File.dirname (Win全般) [bug]>))
* ((<ruby 1.8.4 feature/File::Stat#pipe? [bug]>))
* ((<ruby 1.8.4 feature/Array#fill [bug]>))
* ((<ruby 1.8.4 feature/String#scan [bug]>))
* ((<ruby 1.8.4 feature/File.join [bug]>)...
...from Kernel method.
#
# * eval.c (exec_under): frame during eval should preserve external
# information.

: super [bug]

Kernel
のメソッド内でsuperを呼んだ時に、存在しないsuperclass
にアクセスしようとするバグの修正。

module Kernel...
<< 1 2 > >>