568件ヒット
[1-100件を表示]
(0.054秒)
別のキーワード
ライブラリ
- ビルトイン (120)
- benchmark (132)
- fileutils (12)
- rake (12)
-
rexml
/ document (24) -
rexml
/ sax2listener (24) -
rexml
/ streamlistener (12) - shell (18)
-
shell
/ command-processor (18) -
shell
/ filter (24) -
shell
/ system-command (12) - timeout (21)
- win32ole (12)
- zlib (12)
クラス
-
Benchmark
:: Tms (72) - Dir (12)
-
File
:: Stat (12) - IO (12)
-
REXML
:: DocType (12) -
REXML
:: NotationDecl (12) - Shell (18)
-
Shell
:: CommandProcessor (18) -
Shell
:: Filter (24) -
Shell
:: SystemCommand (12) - String (12)
- SystemCallError (12)
- SystemExit (12)
-
WIN32OLE
_ TYPELIB (12)
モジュール
- Benchmark (60)
- FileUtils (12)
- Kernel (48)
-
REXML
:: SAX2Listener (24) -
REXML
:: StreamListener (12) - Rake (12)
- Timeout (21)
- Zlib (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - === (12)
- FORMAT (24)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 6 . 0 (7) -
OS
_ ZSYSTEM (12) - Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Win32ネイティブ版Rubyの互換性問題 (12)
- active? (6)
- application= (12)
- benchmark (12)
- bm (12)
- bmbm (12)
-
close
_ on _ exec= (12) - cstime (12)
- doctype (24)
- format (12)
- glob (18)
- measure (12)
- new (36)
- notationdecl (12)
- open (12)
- out (18)
- pipe? (12)
- public (12)
- rdoc (12)
-
rexml
/ parsers / sax2parser (12) -
rexml
/ parsers / ultralightparser (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) - stime (12)
- success? (12)
- sum (12)
- timeout (21)
-
to
_ a (12) - transact (18)
- uptodate? (12)
- wait? (6)
- | (6)
検索結果
先頭5件
-
Kernel
. # system(command , options={}) -> bool | nil (18236.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ドを実行することができなかった場合、多くのシェルはステータス
127 を返します。シェルを介さない場合は Ruby の子プロセスがステータス
127 で終了します。
コマンドが実行できなかったのか、コマンドが失敗したのかは......ル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
//emlist[exceptionオプションを指定][ruby]{
system("sad", exception: true) # => Errno::ENOENT (No such file or directory - sad)
system('ruby -e "exit(false)"', exception: true)......# => RuntimeError (Command failed with exit 1: ruby -e "exit(false)")
system('ruby -e "exit(true)"', exception: true) # => true
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , command , options={}) -> bool | nil (18236.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ドを実行することができなかった場合、多くのシェルはステータス
127 を返します。シェルを介さない場合は Ruby の子プロセスがステータス
127 で終了します。
コマンドが実行できなかったのか、コマンドが失敗したのかは......ル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
//emlist[exceptionオプションを指定][ruby]{
system("sad", exception: true) # => Errno::ENOENT (No such file or directory - sad)
system('ruby -e "exit(false)"', exception: true)......# => RuntimeError (Command failed with exit 1: ruby -e "exit(false)")
system('ruby -e "exit(true)"', exception: true) # => true
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , program , *args , options={}) -> bool | nil (18221.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ドを実行することができなかった場合、多くのシェルはステータス
127 を返します。シェルを介さない場合は Ruby の子プロセスがステータス
127 で終了します。コマンドが実行できなかったのか、コマンドが失敗したの
かは......se RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(program , *args , options={}) -> bool | nil (18221.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ドを実行することができなかった場合、多くのシェルはステータス
127 を返します。シェルを介さない場合は Ruby の子プロセスがステータス
127 で終了します。コマンドが実行できなかったのか、コマンドが失敗したの
かは......se RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(command , options={}) -> bool | nil (18218.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ドを実行することができなかった場合、多くのシェルはステータス
127 を返します。シェルを介さない場合は Ruby の子プロセスがステータス
127 で終了します。
コマンドが実行できなかったのか、コマンドが失敗したのかは......文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , command , options={}) -> bool | nil (18218.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ドを実行することができなかった場合、多くのシェルはステータス
127 を返します。シェルを介さない場合は Ruby の子プロセスがステータス
127 で終了します。
コマンドが実行できなかったのか、コマンドが失敗したのかは......文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , program , *args , options={}) -> bool | nil (18218.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ドを実行することができなかった場合、多くのシェルはステータス
127 を返します。シェルを介さない場合は Ruby の子プロセスがステータス
127 で終了します。コマンドが実行できなかったのか、コマンドが失敗したの
かは......s オプションパラメータ Hash
@raise ArgumentError 第一引数が配列かつ要素数が 2 でない場合に発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(program , *args , options={}) -> bool | nil (18218.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ドを実行することができなかった場合、多くのシェルはステータス
127 を返します。シェルを介さない場合は Ruby の子プロセスがステータス
127 で終了します。コマンドが実行できなかったのか、コマンドが失敗したの
かは......s オプションパラメータ Hash
@raise ArgumentError 第一引数が配列かつ要素数が 2 でない場合に発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Benchmark
. # benchmark(caption = "" , label _ width = nil , fmtstr = nil , *labels) {|rep| . . . } -> [Benchmark :: Tms] (9418.0) -
Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
...
Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
基本的には以下のように使います。
ブロックが Benchmark::Tms オブジェクトの配列を返した場合は、
それらの数値も追加の行に表示......指定します。
@param label_width ラベルの幅を指定します。
@param fmtstr フォーマット文字列を指定します。
この引数を省略すると Benchmark::FORMAT が使用されます。
@param labels ブロックが Benchmark::Tms オブジェクト......す。Benchmark::Tms#utime
: %y
system CPU time で置き換えられます(Mnemonic: y of "s*y*stem")。Benchmark::Tms#stime
: %U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの system CPU time で置き換えられます。Benchmar... -
Benchmark
. # bmbm(width = 0) {|job| . . . } -> [Benchmark :: Tms] (9206.0) -
Benchmark::Job オブジェクトを生成して、それを引数として与えられたブロックを 実行します。
...
Benchmark::Job オブジェクトを生成して、それを引数として与えられたブロックを
実行します。
ベンチマークの結果は GC の影響によって歪められてしまうことがあります。
このメソッドは与えられたブロックを二度実行する......分離する
ことは保証されません。
@param width ラベルの幅を指定します。
//emlist[][ruby]{
require 'benchmark'
array = (1..1000000).map { rand }
Benchmark.bmbm do |x|
x.report("sort!") { array.dup.sort! }
x.report("sort") { array.dup.sort }
end
#=>
#
# Rehearsal --......11.938000 ( 12.756000)
# sort 13.048000 0.020000 13.068000 ( 13.857000)
# ------------------------------- total: 25.006000sec
#
# user system total real
# sort! 12.959000 0.010000 12.969000 ( 13.793000)
# sort 12.007000 0.000000 12.007000 ( 12.791000)
//}... -
Zlib
:: OS _ ZSYSTEM -> Integer (9100.0) -
OS の種類を表す定数です。
OS の種類を表す定数です。 -
Benchmark
. # bm(label _ width = 0 , *labels) {|rep| . . . } -> [Benchmark :: Tms] (6118.0) -
Benchmark.#benchmark メソッドの引数を簡略化したものです。
...
Benchmark.#benchmark メソッドの引数を簡略化したものです。
Benchmark.#benchmark メソッドと同様に働きます。
@param label_width ラベルの幅を指定します。
@param labels ブロックが Benchmark::Tms オブジェクトの配列を返す場合に指定し......ます。
//emlist[][ruby]{
require 'benchmark'
n = 50000
Benchmark.bm do |x|
x.report { for i in 1..n; a = "1"; end }
x.report { n.times do ; a = "1"; end }
x.report { 1.upto(n) do ; a = "1"; end }
end
#=>
#
# user system total real
# 1.033333 0.016667 1.016667 (......す。
//emlist[][ruby]{
require 'benchmark'
n = 50000
Benchmark.bm(7) do |x|
x.report("for:") { for i in 1..n; a = "1"; end }
x.report("times:") { n.times do ; a = "1"; end }
x.report("upto:") { 1.upto(n) do ; a = "1"; end }
end
#=>
# user system total rea... -
REXML
:: DocType # public -> String | nil (6118.0) -
DTD の公開識別子を返します。
...list[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype.public # =>......"-//W3C//DTD XHTML 1.0 Strict//EN"
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE root SYSTEM "foobar">
EOS
doctype.system # => "foobar"
doctype.public # => nil
//}...