ライブラリ
- English (22)
- ビルトイン (437)
-
bigdecimal
/ math (11) - cmath (24)
- csv (11)
- erb (11)
- etc (22)
- matrix (22)
- mkmf (22)
-
net
/ http (22) - open3 (99)
- openssl (99)
- pathname (11)
- psych (99)
- pty (33)
- resolv (22)
-
rexml
/ sax2listener (33) -
rexml
/ streamlistener (11) -
rinda
/ tuplespace (22) - ripper (11)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - socket (44)
- stringio (11)
- syslog (55)
- timeout (19)
- win32ole (44)
クラス
- CSV (11)
- Complex (44)
- ERB (11)
- File (11)
-
File
:: Stat (11) - Float (63)
- IO (11)
-
Matrix
:: LUPDecomposition (11) - Numeric (44)
-
OpenSSL
:: PKCS7 (22) -
OpenSSL
:: PKCS7 :: RecipientInfo (44) - Pathname (11)
-
Psych
:: Handler (22) -
Psych
:: Nodes :: Mapping (77) -
RDoc
:: Options (11) - Regexp (22)
-
Resolv
:: DNS :: Resource :: SOA (22) -
Rinda
:: TupleEntry (22) - Ripper (11)
-
RubyVM
:: InstructionSequence (44) - Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - Socket (22)
- StopIteration (11)
- String (22)
- StringIO (11)
- Symbol (11)
- Vector (11)
- WIN32OLE (33)
-
WIN32OLE
_ METHOD (11)
モジュール
- BigMath (11)
- CMath (24)
- Etc (22)
- FileTest (11)
- Kernel (66)
- Math (55)
-
Net
:: HTTPHeader (22) - Open3 (99)
-
OpenSSL
:: OCSP (11) -
OpenSSL
:: X509 (22) - PTY (33)
- Process (55)
-
REXML
:: SAX2Listener (33) -
REXML
:: StreamListener (11) -
Socket
:: Constants (22) - Syslog (44)
-
Syslog
:: Option (11) - Timeout (19)
キーワード
-
$ PID (11) -
$ PROCESS _ ID (11) - BLOCK (11)
- FLOW (11)
-
LOG
_ PID (11) - Marshal フォーマット (11)
-
PC
_ PIPE _ BUF (11) -
RESPID
_ KEY (11) -
SC
_ SPIN _ LOCKS (11) -
TCP
_ KEEPIDLE (22) -
TCP
_ KEEPINTVL (22) -
V
_ ERR _ CERT _ HAS _ EXPIRED (11) -
V
_ ERR _ CRL _ HAS _ EXPIRED (11) -
_ getproperty (11) -
_ invoke (11) -
_ setproperty (11) - acos (11)
-
add
_ recipient (11) - anchor (11)
- angle (33)
-
angle
_ with (11) - arg (33)
- asin (11)
- bigdecimal (11)
- capitalize (22)
- capitalize! (11)
- check (11)
- compile (22)
-
compile
_ error (11) -
compile
_ file (11) -
compile
_ option (11) - cos (11)
- cos! (6)
- dispid (11)
-
each
_ capitalized (11) -
each
_ capitalized _ name (11) -
enc
_ key (11) -
end
_ mapping (11) -
end
_ prefix _ mapping (11) - exp (6)
- expire (11)
- expired? (11)
- expires (11)
- getpty (11)
- hash (11)
- implicit (11)
- instruction (11)
- issuer (11)
- kill (11)
- new (55)
- open (22)
- open! (11)
- phase (33)
- pid (33)
- pipe (11)
- pipe? (62)
- pipeline (11)
-
pipeline
_ r (22) -
pipeline
_ rw (22) -
pipeline
_ start (22) -
pipeline
_ w (22) - pivots (11)
- polar (22)
- printf (22)
-
processing
_ instruction (11) - recipients (11)
- reopen (11)
- result (11)
-
rexml
/ parsers / pullparser (11) -
rexml
/ parsers / ultralightparser (11) - round (19)
- serial (11)
-
set
_ eoutvar (11) - sin (11)
- sin! (6)
- spawn (11)
-
start
_ mapping (11) -
start
_ prefix _ mapping (11) - style (11)
- tag (11)
- tan! (6)
- timeout (19)
-
try
_ compile (22) - wait (11)
- wait2 (11)
- waitpid (11)
- waitpid2 (11)
検索結果
先頭5件
- RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence - BigMath
. # PI(prec) -> BigDecimal - Math
:: PI -> Float - RubyVM
:: InstructionSequence . compile(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence - Open3
. # pipeline _ r(*cmds) -> [IO , [Thread]]
-
RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence (18506.0) -
引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。
@param file......lse、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
# /tmp/hello.rb
puts "Hello, world!"
# irb
RubyVM::InstructionSequence.compile_file("/tmp/hel......lo.rb")
# => <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>
@see RubyVM::InstructionSequence.compile... -
BigMath
. # PI(prec) -> BigDecimal (18319.0) -
円周率を prec で指定した精度で計算します。
...指定された場合に発生します。
//emlist[][ruby]{
require "bigdecimal/math"
puts BigMath::PI(2) #=> 0.31415926535897932384671233672993238432e1
puts BigMath::PI(5) #=> 0.31415926535897932384627534923029509162e1
puts BigMath::PI(10) #=> 0.3141592653589793238462643388813853786957412e1
//... -
Math
:: PI -> Float (18307.0) -
円周率
...円周率
//emlist[例][ruby]{
p Math::PI
# => 3.141592654
//}... -
RubyVM
:: InstructionSequence . compile(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (12400.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...@param file ファイル名を文字列で指定します。
@param path 引数 file の絶対パスファイル名を文字列で指定します。
@param line 引数 source の 1 行目の行番号を指定します。
@param options コンパイル時のオプションを true、false、Hash......かで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
RubyVM::InstructionSequence.compile("a = 1 + 2")
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
@see RubyVM::InstructionSequence.compile_file... -
Open3
. # pipeline _ r(*cmds) -> [IO , [Thread]] (12306.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。最後の コマンドの標準出力を受けとる事ができます。
...リストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。
options には Hash で指定します......します。
例:
require "open3"
Open3.pipeline_r("yes", "head -10") {|r, ts|
p r.read #=> "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n"
p ts[0].value #=> #<Process::Status: pid 24910 SIGPIPE (signal 13)>
p ts[1].value #=> #<Process::Status: pid 24913 exit 0>
}
@see Open3.#popen3... -
Open3
. # pipeline _ r(*cmds) {|last _ stdout , wait _ thrs| . . . } -> () (12306.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。最後の コマンドの標準出力を受けとる事ができます。
...リストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。
options には Hash で指定します......します。
例:
require "open3"
Open3.pipeline_r("yes", "head -10") {|r, ts|
p r.read #=> "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n"
p ts[0].value #=> #<Process::Status: pid 24910 SIGPIPE (signal 13)>
p ts[1].value #=> #<Process::Status: pid 24913 exit 0>
}
@see Open3.#popen3... -
Kernel
# try _ compile(src , opt = "" , *opts) -> bool (12300.0) -
与えられた C のソースコードがコンパイルできた場合は真を返します。 コンパイルできなかった場合は偽を返します。
...ル前に評価されます。
ブロック内でソースコードを変更することができます。
@param src C のソースコードを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。... -
Kernel
# try _ compile(src , opt = "" , *opts) { . . . } -> bool (12300.0) -
与えられた C のソースコードがコンパイルできた場合は真を返します。 コンパイルできなかった場合は偽を返します。
...ル前に評価されます。
ブロック内でソースコードを変更することができます。
@param src C のソースコードを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。... -
Net
:: HTTPHeader # each _ capitalized _ name {|name| . . . . } -> () (12300.0) -
保持しているヘッダ名を正規化 ('x-my-header' -> 'X-My-Header') して、ブロックに渡します。
...y-header' -> 'X-My-Header')
して、ブロックに渡します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_capitalized_name { |key| puts key }
# => Accept-Encoding
# => Accept
# => User-Agent... -
Open3
. # pipeline(*cmds) -> [Process :: Status] (12300.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。
...リストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。
options には Hash で指定します......v, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]
@return 実行したコマンドの終了ステータスを配列で返します。
例1:
require "open3"
fname = "/usr/share/man/man1/ruby.1.gz"
p Open3.pipeline(["zca......t", fname], "nroff -man", "less")
#=> [#<Process::Status: pid 11817 exit 0>,
# #<Process::Status: pid 11820 exit 0>,
# #<Process::Status: pid 11828 exit 0>]
例2:
require "open3"
Open3.pipeline([{"LANG"=>"C"}, "env"], ["grep", "LANG"], "less")
@see Open3.#popen3...