別のキーワード
ライブラリ
- ビルトイン (2288)
- abbrev (12)
- base64 (12)
- benchmark (24)
- bigdecimal (38)
-
bigdecimal
/ ludcmp (24) -
bigdecimal
/ math (72) - cmath (126)
- digest (12)
- drb (48)
- erb (12)
- etc (180)
- fiddle (48)
- fileutils (547)
- find (12)
- json (132)
- nkf (12)
- objspace (132)
- open-uri (16)
- open3 (216)
- openssl (744)
- pp (4)
- profiler (18)
- pty (48)
- readline (12)
- rubygems (60)
- shellwords (36)
- syslog (132)
- timeout (21)
-
webrick
/ accesslog (36) -
webrick
/ htmlutils (12) -
webrick
/ httpauth (24) -
webrick
/ httpstatus (84) -
webrick
/ httputils (132) -
webrick
/ utils (36) -
win32
/ registry (192) -
win32
/ resolv (24) - zlib (12)
クラス
-
Win32
:: Resolv (24)
モジュール
- Abbrev (12)
- Base64 (12)
- Benchmark (24)
- BigMath (96)
- CMath (126)
- DRb (36)
-
DRb
:: DRbProtocol (12) - Digest (12)
-
ERB
:: Util (12) - Etc (180)
- Fiddle (48)
- FileTest (90)
- FileUtils (547)
- Find (12)
- Gem (60)
- JSON (132)
- Kernel (1042)
- LUSolve (24)
- Marshal (48)
- Math (84)
- NKF (12)
- ObjectSpace (252)
- Open3 (216)
- OpenSSL (48)
-
OpenSSL
:: ASN1 (564) -
OpenSSL
:: PKCS5 (24) -
OpenSSL
:: Random (108) - PTY (48)
- Process (458)
-
Process
:: GID (132) -
Process
:: Sys (180) -
Process
:: UID (132) -
Profiler
_ _ (18) - Readline (12)
- Shellwords (36)
- Signal (36)
- Syslog (108)
-
Syslog
:: Macros (24) - Timeout (21)
-
WEBrick
:: AccessLog (36) -
WEBrick
:: HTMLUtils (12) -
WEBrick
:: HTTPAuth (24) -
WEBrick
:: HTTPStatus (84) -
WEBrick
:: HTTPUtils (132) -
WEBrick
:: Utils (36) -
Win32
:: Registry :: API (192) - Zlib (12)
キーワード
- Array (12)
- BMPString (24)
- BigDecimal (14)
- BitString (24)
- Boolean (24)
- CloseKey (12)
- Complex (24)
- CreateKey (12)
- DeleteKey (12)
- DeleteValue (12)
- E (12)
- EnumKey (12)
- EnumValue (12)
- Enumerated (24)
- Float (12)
- FlushKey (12)
- GeneralString (24)
- GeneralizedTime (24)
- GraphicString (24)
- IA5String (24)
- ISO64String (24)
- Integer (36)
-
LOG
_ MASK (12) -
LOG
_ UPTO (12) - Null (24)
- NumericString (24)
- ObjectId (24)
- OctetString (24)
- OpenKey (12)
- PI (12)
- PrintableString (24)
- QueryInfoKey (12)
- QueryValue (12)
- Rational (7)
- Sequence (24)
- Set (24)
- SetValue (12)
- String (12)
- T61String (24)
- UTCTime (24)
- UTF8String (24)
- UniversalString (24)
- VideotexString (24)
-
_ _ callee _ _ (12) -
_ _ method _ _ (12) -
_ id2ref (12) - abbrev (12)
- acos (6)
- acosh (6)
-
add
_ protocol (12) -
allocation
_ sourcefile (12) -
allocation
_ sourceline (12) - argv0 (12)
- asin (6)
- asinh (6)
-
at
_ exit (12) - atan (18)
- atan2 (6)
- atanh (6)
- autoload (12)
- autoload? (12)
-
basic
_ auth (12) - benchmark (12)
- binding (12)
- bm (12)
- caller (36)
-
caller
_ locations (24) - capture2 (12)
- capture2e (12)
- capture3 (12)
- catch (24)
- cbrt (18)
- cd (24)
-
change
_ privilege (24) - chdir (24)
- check (12)
- chmod (12)
-
chmod
_ R (12) - chomp (12)
- chop (12)
- chown (12)
-
chown
_ R (12) -
clear
_ paths (12) -
client
_ error? (12) -
clock
_ gettime (12) - cmp (12)
-
compare
_ file (12) -
compare
_ stream (12) - copy (12)
-
copy
_ entry (12) -
copy
_ file (12) -
copy
_ stream (12) - cos (18)
- cosh (6)
-
count
_ nodes (12) -
count
_ objects (12) -
count
_ objects _ size (12) -
count
_ tdata _ objects (12) - cp (12)
-
cp
_ lr (7) -
cp
_ r (12) -
create
_ listeners (12) - daemon (12)
- debug (12)
- debug= (12)
- decode (12)
-
decode
_ all (12) -
define
_ finalizer (24) - deflate (12)
- dequote (12)
- detach (12)
- dlopen (12)
- dlunwrap (12)
- dlwrap (12)
- dump (36)
-
each
_ object (48) - egd (12)
-
egd
_ bytes (12) - egid (12)
- egid= (12)
- eid (24)
- eid= (24)
- empty? (9)
- endpwent (12)
- error? (12)
- errors (12)
- escape (36)
- escape8bit (12)
-
escape
_ path (12) - euid (12)
- euid= (12)
- eval (24)
- exec (48)
- exp (30)
- exp! (6)
- facility (12)
- fail (36)
-
fast
_ unparse (12) -
fips
_ mode= (12) - format (24)
- free (12)
- frexp (12)
-
from
_ name (24) - gamma (12)
-
garbage
_ collect (12) -
get
_ hosts _ path (12) -
get
_ resolv _ info (12) - getegid (12)
- geteuid (12)
- getgid (12)
- getgrent (12)
- getgrgid (12)
- getgrnam (12)
- getpgid (12)
- getpgrp (12)
- getpriority (12)
- getpty (24)
- getpwent (12)
- getpwnam (12)
- getpwuid (12)
- getrlimit (12)
- gets (12)
- getservername (12)
- getsid (12)
- getuid (12)
- gid (12)
- gid= (12)
-
global
_ variables (12) -
grant
_ privilege (24) - group (24)
- groups (12)
- groups= (12)
- grpowned? (12)
- gsub (36)
- hexencode (12)
-
html
_ escape (12) - hypot (12)
- ident (12)
- identical? (24)
- info? (12)
- initgroups (12)
- install (12)
- issetugid (12)
- kill (12)
- lambda (18)
- ldexp (12)
- link (12)
- list (12)
- ln (12)
-
ln
_ s (12) -
ln
_ sf (12) - load (36)
-
load
_ file (12) -
load
_ file! (12) -
load
_ mime _ types (12) -
load
_ random _ file (12) -
local
_ variables (12) - log (36)
- log10 (6)
- log2 (6)
- loop (24)
- ludecomp (12)
- lusolve (12)
- makedirs (12)
- maxgroups (12)
- maxgroups= (12)
-
memsize
_ of (12) -
memsize
_ of _ all (12) -
mime
_ type (12) - mkdir (12)
-
mkdir
_ p (12) - mkpath (12)
- move (12)
- mv (12)
- nkf (12)
- nprocessors (12)
- open (64)
- open! (12)
- opened? (12)
- packdw (12)
- packqw (12)
- parse (12)
- parse! (12)
-
parse
_ header (12) -
parse
_ range _ header (12) - passwd (24)
- path (12)
-
pbkdf2
_ hmac (12) -
pbkdf2
_ hmac _ sha1 (12) - pid (12)
- pipe? (12)
- pipeline (12)
-
pipeline
_ r (24) -
pipeline
_ rw (24) -
pipeline
_ start (24) -
pipeline
_ w (24) - popen2 (24)
- popen2e (24)
- popen3 (24)
- pp (12)
- ppid (12)
- prefix (12)
-
pretty
_ generate (12) -
pretty
_ unparse (12) -
primary
_ server (12) -
primary
_ server= (12) - print (12)
-
print
_ profile (6) - printf (24)
- proc (19)
-
proxy
_ basic _ auth (12) - prune (12)
-
pseudo
_ bytes (12) - putc (12)
- puts (12)
- pwd (12)
- quote (12)
- raise (36)
-
random
_ add (12) -
random
_ bytes (12) -
random
_ string (12) -
re
_ exchange (24) -
re
_ exchangeable? (24) -
reachable
_ objects _ from (12) - readline (24)
- readlines (12)
-
reason
_ phrase (12) - redirect? (12)
- remove (12)
-
remove
_ dir (12) -
remove
_ entry (12) -
remove
_ entry _ secure (12) -
remove
_ file (12) - reopen (12)
-
require
_ relative (12) - restore (24)
- rid (24)
- rm (12)
-
rm
_ f (12) -
rm
_ r (12) -
rm
_ rf (12) - rmdir (12)
- rmtree (12)
-
safe
_ unlink (12) - seed (12)
- select (12)
-
server
_ error? (12) -
set
_ paths (12) -
set
_ trace _ func (12) - setegid (12)
- seteuid (12)
- setgid (12)
- setpgid (12)
- setpgrp (12)
- setpriority (12)
- setproctitle (12)
- setpwent (12)
- setregid (12)
- setresgid (12)
- setresuid (12)
- setreuid (12)
- setrgid (12)
- setrlimit (24)
- setruid (12)
- setsid (12)
- setuid (12)
-
setup
_ params (12) - shellescape (12)
- shellsplit (12)
- shellwords (12)
-
sid
_ available? (24) - sin (18)
- sinh (6)
- sleep (24)
- socket? (12)
- spawn (72)
-
split
_ header _ value (12) - sprintf (12)
- sqrt (30)
- srand (24)
-
start
_ profile (6) - status? (12)
-
stop
_ profile (6) -
stop
_ service (12) - sub (24)
- success? (12)
- switch (48)
- symlink (12)
- sysconfdir (12)
- system (48)
- systmpdir (12)
- tan (6)
- tanh (6)
- test (24)
- timeout (21)
- times (12)
- touch (12)
-
trace
_ object _ allocations (12) -
trace
_ object _ allocations _ start (12) -
trace
_ object _ allocations _ stop (12) -
trace
_ var (36) - trap (48)
- traverse (12)
- uid (12)
- uid= (12)
-
undefine
_ finalizer (12) - unescape (12)
- unpackdw (12)
- unpackqw (12)
- unparse (12)
-
untrace
_ var (12) - uptodate? (12)
-
urlsafe
_ encode64 (12) - wait (12)
- wait2 (12)
- waitall (12)
- waitpid (12)
- waitpid2 (12)
- warmup (2)
- warn (8)
-
win
_ platform? (12) -
world
_ readable? (12) -
world
_ writable? (12) -
write
_ random _ file (12) - zero? (9)
検索結果
先頭5件
-
Kernel
. # p(*arg) -> object | Array (18120.0) -
引数を人間に読みやすい形に整形して改行と順番に標準出力 $stdout に出力します。主にデバッグに使用します。
...使用します。
引数の inspect メソッドの返り値と改行を順番に出力します。つまり以下のコードと同じです。
//emlist[例][ruby]{
print arg[0].inspect, "\n", arg[1].inspect, "\n" #, ...
//}
整形に用いられるObject#inspectは普通に文字列に変換......別がつかなくなるようなクラス間の差異も表現できるように工夫されています。
p に引数を与えずに呼び出した場合は特に何もしません。
@param arg 出力するオブジェクトを任意個指定します。
@raise IOError 標準出力が書き込......された引数 arg を返します。複数の引数が指定された場合はそれらを要素とする配列を返します。
//emlist[例][ruby]{
puts "" #=> (空行)
p "" #=> ""
puts 50,"50"
#=> 50
#=> 50
p 50,"50"
#=> 50
#=> "50"
//}
@see Object#inspect,Kernel.#puts,Kernel.#print... -
Profiler
_ _ . # print _ profile(file) -> () (15201.0) -
stop_profile を実行し、プロファイルの結果を file に出力します。 file には printf メソッドが定義されていなければいけません。
...stop_profile を実行し、プロファイルの結果を file に出力します。
file には printf メソッドが定義されていなければいけません。
@param file File のインスタンスを指定します。... -
DRb
:: DRbProtocol . # add _ protocol(prot) -> () (9201.0) -
新たなプロトコルを DRbProtocol モジュールに登録します。
...新たなプロトコルを DRbProtocol モジュールに登録します。
@param prot プロトコル定義クラス... -
Process
. # setpriority(which , who , prio) -> 0 (9201.0) -
プロセス、プロセスグループ、 ユーザのいずれかの現在のプライオリティを設定します 。プライオリティの設定に成功した場合は 0 を返します。
...設定に成功した場合は 0 を返します。
@param which プライオリティを設定する対象の種類を以下の定数のいずれかで指定します。
* Process::PRIO_PROCESS
* Process::PRIO_PGRP
* Process::PRIO_USER
@param who which の値にしたがってプロセス ID......、プロセスグループ ID、ユーザ ID のいずれかを整数で指定します。
@param prio プライオリティを -20 から 20 までの整数で設定します。小さな値はプライオリティが高いことを意味し、大きな値はプライオリティが低いことを......意味します。
@raise Errno::EXXX プライオリティの設定に失敗した場合に発生します。
@raise NotImplementedError メソッドが現在のプラットフォームで実装されていない場合に発生します。
以下の例は呼び出したプロセス自身のプ... -
Open3
. # popen3(*cmd) -> [IO , IO , IO , Thread] (9125.0) -
外部プログラム cmd を実行し、そのプロセスの標準入力、標準出力、標準エラー 出力に接続されたパイプと実行したプロセスを待つためのスレッドを 4 要素の 配列で返します。
...実行したプロセスを待つためのスレッドを 4 要素の
配列で返します。
require 'open3'
stdin, stdout, stderr, wait_thr = *Open3.popen3("/usr/bin/nroff -man")
@param cmd 実行するコマンドを指定します。
@return ブロックを指定した場合はブロッ......最後の式の結果を返します。
require 'open3'
Open3.popen3("read stdin; echo stdout; echo stderr >&2") {|stdin, stdout, stderr, wait_thr|
stdin.puts "stdin"
stdin.close # または close_write
p stdout.read
p stderr.read
}
#=> "stdout\n"
"stderr\n"
std......ose_write
で閉じるべきです。
[UNIX系OS固有の注意] Open3 で作成した子プロセスは
wait(2) しなくてもゾンビになりません。
引数 cmd はそのまま Kernel.#spawn に渡されます。
Kernel.#spawnと同様に、引数リストの最初に環境変数をハッ... -
Open3
. # popen3(*cmd) {|stdin , stdout , stderr , wait _ thr| . . . } -> () (9125.0) -
外部プログラム cmd を実行し、そのプロセスの標準入力、標準出力、標準エラー 出力に接続されたパイプと実行したプロセスを待つためのスレッドを 4 要素の 配列で返します。
...実行したプロセスを待つためのスレッドを 4 要素の
配列で返します。
require 'open3'
stdin, stdout, stderr, wait_thr = *Open3.popen3("/usr/bin/nroff -man")
@param cmd 実行するコマンドを指定します。
@return ブロックを指定した場合はブロッ......最後の式の結果を返します。
require 'open3'
Open3.popen3("read stdin; echo stdout; echo stderr >&2") {|stdin, stdout, stderr, wait_thr|
stdin.puts "stdin"
stdin.close # または close_write
p stdout.read
p stderr.read
}
#=> "stdout\n"
"stderr\n"
std......ose_write
で閉じるべきです。
[UNIX系OS固有の注意] Open3 で作成した子プロセスは
wait(2) しなくてもゾンビになりません。
引数 cmd はそのまま Kernel.#spawn に渡されます。
Kernel.#spawnと同様に、引数リストの最初に環境変数をハッ... -
Open3
. # pipeline _ r(*cmds) -> [IO , [Thread]] (9119.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。最後の コマンドの標準出力を受けとる事ができます。
...マンドのリストをパイプで繋いで順番に実行します。最後の
コマンドの標準出力を受けとる事ができます。
@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で......options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。
(1) commandline
(2) [commandline, options]......(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]
@return ブロックを指定した場合はブロックの最後に評価された値を返します。
ブロックを指定しなかった場合は最後に実... -
Open3
. # pipeline _ r(*cmds) {|last _ stdout , wait _ thrs| . . . } -> () (9119.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。最後の コマンドの標準出力を受けとる事ができます。
...マンドのリストをパイプで繋いで順番に実行します。最後の
コマンドの標準出力を受けとる事ができます。
@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で......options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。
(1) commandline
(2) [commandline, options]......(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]
@return ブロックを指定した場合はブロックの最後に評価された値を返します。
ブロックを指定しなかった場合は最後に実... -
Open3
. # pipeline(*cmds) -> [Process :: Status] (9107.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。
...指定したコマンドのリストをパイプで繋いで順番に実行します。
@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマン......options には Hash で指定します。
env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。
(1) commandline
(2) [commandline, options]......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(["zcat",...