6839件ヒット
[1-100件を表示]
(0.153秒)
ライブラリ
- ビルトイン (2626)
- abbrev (12)
- base64 (72)
- benchmark (60)
- bigdecimal (38)
-
bigdecimal
/ ludcmp (12) -
bigdecimal
/ math (72) -
bigdecimal
/ newton (24) - cmath (240)
- continuation (12)
- digest (12)
-
digest
/ bubblebabble (12) - drb (120)
- erb (60)
- etc (252)
- fiddle (48)
- fileutils (559)
- find (23)
- json (156)
- kconv (156)
- mathn (8)
- nkf (24)
- objspace (132)
- open-uri (16)
- open3 (216)
- openssl (672)
- pp (4)
- profiler (18)
- pty (48)
- readline (12)
- rubygems (120)
- shellwords (48)
- syslog (240)
- timeout (21)
- uri (12)
-
webrick
/ accesslog (36) -
webrick
/ htmlutils (12) -
webrick
/ httpauth (24) -
webrick
/ httpstatus (84) -
webrick
/ httputils (132) -
webrick
/ utils (72) -
win32
/ registry (192) -
win32
/ resolv (24) - zlib (106)
クラス
-
Win32
:: Resolv (24)
モジュール
- Abbrev (12)
- Base64 (72)
- Benchmark (60)
- BigMath (96)
- CMath (240)
- DRb (108)
-
DRb
:: DRbProtocol (12) - Digest (24)
-
ERB
:: DefMethod (12) -
ERB
:: Util (48) - Etc (252)
- Fiddle (48)
- FileTest (318)
- FileUtils (559)
- Find (23)
- Gem (120)
- JSON (156)
- Kconv (156)
- Kernel (1080)
- LUSolve (12)
- Marshal (48)
- Math (332)
- NKF (24)
- Newton (24)
- ObjectSpace (252)
- Open3 (216)
- OpenSSL (12)
-
OpenSSL
:: ASN1 (528) -
OpenSSL
:: PKCS5 (24) -
OpenSSL
:: Random (108) - PTY (48)
- Process (374)
-
Process
:: GID (96) -
Process
:: Sys (180) -
Process
:: UID (96) -
Profiler
_ _ (18) - Readline (12)
- Shellwords (48)
- Signal (48)
- Syslog (216)
-
Syslog
:: Macros (24) - Timeout (21)
-
WEBrick
:: AccessLog (36) -
WEBrick
:: HTMLUtils (12) -
WEBrick
:: HTTPAuth (24) -
WEBrick
:: HTTPStatus (84) -
WEBrick
:: HTTPUtils (132) -
WEBrick
:: Utils (72) -
Win32
:: Registry :: API (192) - Zlib (106)
キーワード
- BMPString (24)
- BigDecimal (14)
- BitString (24)
- Boolean (12)
- CloseKey (12)
- Complex (14)
- 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 (12)
- NumericString (24)
- ObjectId (24)
- OctetString (24)
- OpenKey (12)
- PI (12)
- PrintableString (24)
- QueryInfoKey (12)
- QueryValue (12)
- Rational (12)
- Sequence (12)
- Set (24)
- SetValue (12)
- String (12)
- T61String (24)
- URI (12)
- UTCTime (24)
- UTF8String (24)
- UniversalString (24)
- VideotexString (24)
-
_ _ dir _ _ (12) -
_ _ method _ _ (12) -
_ id2ref (12) - ` (12)
- abbrev (12)
- abort (24)
- acos (18)
- acos! (6)
- acosh (18)
- acosh! (6)
-
add
_ protocol (12) - adler32 (17)
-
adler32
_ combine (12) - alert (12)
-
allocation
_ sourcefile (12) -
allocation
_ sourceline (12) - argv0 (12)
- asin (18)
- asin! (6)
- asinh (18)
- asinh! (6)
-
at
_ exit (12) - atan (30)
- atan! (6)
- atan2 (18)
- atan2! (6)
- atanh (18)
- atanh! (6)
- autoload (12)
- autoload? (12)
-
basic
_ auth (12) - benchmark (12)
-
block
_ given? (12) - blockdev? (12)
- bm (12)
- bmbm (12)
- bubblebabble (12)
- callcc (12)
- caller (36)
-
caller
_ locations (24) - capture2 (12)
- capture2e (12)
- capture3 (12)
- catch (24)
- cbrt (18)
- cbrt! (6)
- cd (24)
-
change
_ privilege (24) - chardev? (12)
- 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) - config (12)
- confstr (12)
- copy (12)
-
copy
_ entry (12) -
copy
_ file (12) -
copy
_ stream (12) - cos (30)
- cos! (6)
- cosh (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) - crc32 (17)
-
crc32
_ combine (12) -
crc
_ table (12) -
create
_ listeners (12) - crit (12)
-
current
_ server (12) - debug (12)
- decode (12)
- decode64 (12)
-
decode
_ all (12) -
def
_ erb _ method (12) -
define
_ finalizer (24) - deflate (12)
- dequote (12)
- detach (12)
- dir (12)
- directory? (12)
- dlunwrap (12)
- dlwrap (12)
- dump (36)
-
each
_ object (48) - egd (12)
-
egd
_ bytes (12) - egid (12)
- eid (24)
- emerg (12)
- empty? (9)
- encode64 (12)
- endgrent (12)
- endpwent (12)
-
ensure
_ gem _ subdirectories (12) - erf (12)
- erfc (12)
- err (12)
- error? (12)
- errors (12)
- escape (36)
- escape8bit (12)
-
escape
_ path (12) - euid (12)
- eval (24)
- exec (48)
- executable? (12)
-
executable
_ real? (12) - exist? (12)
- exists? (9)
- exit (12)
- exit! (12)
- exp (30)
- exp! (6)
- facility (12)
- fail (12)
-
fast
_ generate (12) -
fast
_ unparse (12) - file? (12)
- find (23)
- fork (24)
- format (24)
- frexp (12)
-
from
_ name (24) - front (12)
- gamma (12)
-
garbage
_ collect (12) - generate (12)
-
get
_ hosts _ path (12) -
get
_ resolv _ info (12) - getegid (12)
- geteuid (12)
- getgid (12)
- getgrent (12)
- getgrgid (12)
- getgrnam (12)
- getlogin (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)
- getwd (12)
- gid (12)
-
grant
_ privilege (24) - group (24)
- groups (12)
- grpowned? (12)
- gsub (36)
- guess (24)
- h (12)
- hexencode (12)
-
html
_ escape (12) - hypot (12)
- ident (12)
- identical? (24)
- inflate (12)
- info (12)
- info? (12)
- initgroups (12)
- install (12)
-
install
_ acl (12) -
install
_ id _ conv (12) - instance (12)
- iseuc (12)
- isjis (12)
- issetugid (12)
- issjis (12)
- isutf8 (12)
- iterator? (12)
- kconv (12)
- kill (12)
- ldexp (12)
- lgamma (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) - log (60)
- log! (12)
- log10 (18)
- log10! (6)
- log2 (18)
- log2! (6)
- loop (24)
- ludecomp (12)
- makedirs (12)
- malloc (12)
-
marshal
_ version (12) - mask (12)
- maxgroups (12)
- measure (12)
-
memsize
_ of (12) -
memsize
_ of _ all (12) -
mime
_ type (12) - mkdir (12)
-
mkdir
_ p (12) - mkpath (12)
- move (12)
- mv (12)
- nkf (12)
- nlsolve (12)
- norm (12)
- notice (12)
- nprocessors (12)
- open (52)
- open! (12)
- owned? (12)
- p (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) - print (12)
-
print
_ profile (6) - printf (24)
-
proxy
_ basic _ auth (12) -
pseudo
_ bytes (12) - putc (12)
- puts (12)
- pwd (12)
- quote (12)
- raise (12)
- rand (24)
-
random
_ add (12) -
random
_ bytes (12) -
random
_ string (12) -
re
_ exchange (24) -
reachable
_ objects _ from (12) - readable? (12)
-
readable
_ real? (12) - readline (24)
- readlines (12)
- realloc (12)
- realtime (12)
-
reason
_ phrase (12) - redirect? (12)
- remove (12)
-
remove
_ dir (12) -
remove
_ entry (12) -
remove
_ entry _ secure (12) -
remove
_ file (12) - reopen (12)
- require (12)
-
require
_ relative (12) - restore (24)
- rid (24)
- rm (12)
-
rm
_ f (12) -
rm
_ r (12) -
rm
_ rf (12) - rmdir (12)
- rmtree (12)
- rsqrt (4)
- ruby (12)
-
safe
_ unlink (12) - seed (12)
- select (12)
-
server
_ error? (12) -
set
_ close _ on _ exec (12) -
set
_ home (12) -
set
_ non _ blocking (12) -
set
_ paths (12) -
set
_ trace _ func (12) - setegid (12)
- seteuid (12)
- setgid (12)
- setgid? (12)
- setgrent (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)
- setuid? (12)
-
setup
_ params (12) - shellescape (12)
- shelljoin (12)
- shellsplit (12)
- shellwords (12)
- signame (12)
- sin (30)
- sin! (6)
- sinh (18)
- sinh! (6)
- size (12)
- size? (12)
- sleep (24)
- socket? (12)
- spawn (72)
-
split
_ header _ value (12) - sprintf (12)
- sqrt (34)
- sqrt! (6)
- srand (24)
-
start
_ profile (6) -
start
_ service (12) - status? (12)
- sticky? (12)
-
stop
_ profile (6) -
stop
_ service (12) -
strict
_ decode64 (12) -
strict
_ encode64 (12) - su (12)
- sub (24)
- success? (12)
- switch (48)
- symlink (12)
- symlink? (12)
- syscall (12)
- sysconf (12)
- sysconfdir (12)
- system (48)
- systmpdir (12)
- tan (18)
- tan! (6)
- tanh (18)
- tanh! (6)
- test (24)
- thread (12)
- throw (12)
- timeout (21)
- times (12)
- toeuc (12)
- tojis (12)
- tolocale (12)
- tosjis (12)
- touch (12)
- toutf16 (12)
- toutf32 (12)
- toutf8 (12)
-
trace
_ object _ allocations (12) -
trace
_ object _ allocations _ start (12) -
trace
_ object _ allocations _ stop (12) -
trace
_ var (36) - trap (48)
- traverse (12)
- u (12)
- uid (12)
- uname (12)
-
undefine
_ finalizer (12) - unescape (12)
- unpackdw (12)
- unpackqw (12)
- unparse (12)
-
untrace
_ var (12) - uptodate? (12)
- uri (12)
-
url
_ encode (12) -
urlsafe
_ decode64 (12) -
urlsafe
_ encode64 (12) - wait (12)
- wait2 (12)
- waitall (12)
- waitpid (12)
- waitpid2 (12)
- warmup (2)
- warn (4)
- warning (12)
-
win
_ platform? (12) -
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) -
write
_ random _ file (12) - zero? (12)
-
zlib
_ version (12)
検索結果
先頭5件
- Timeout
. # timeout(sec , exception _ class = nil) {|i| . . . } -> object - Timeout
. # timeout(sec , exception _ class , message) {|i| . . . } -> object - ObjectSpace
. # count _ objects _ size(result _ hash = nil) -> Hash - ObjectSpace
. # count _ tdata _ objects(result _ hash = nil) -> Hash - ObjectSpace
. # count _ objects(result _ hash = {}) -> Hash
-
Timeout
. # timeout(sec , exception _ class = nil) {|i| . . . } -> object (9249.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...c 秒の期限付きで実行します。
ブロックの実行時間が制限を過ぎたときは例外
Timeout::Error が発生します。
exception_class を指定した場合には Timeout::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がはい......@param exception_class タイムアウトした時、発生させる例外を指定します.
例 長い計算のタイムアウト
require 'timeout'
def calc_pi(min)
loop do
x = rand
y = rand
x**2 + y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end
end
t = 5
min =......in
Timeout.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end
printf "%d: pi = %f\n", min[0] + min[1], min[0]*4.0/(min[0]+min[1])
#例
#=> 417519: pi = 3.141443
例 独自の例外を発生させるタイムアウト
#!/usr/bin/env ruby
require 'ti.......
@param exception_class タイムアウトした時、発生させる例外を指定します.
@param message エラーメッセージを指定します.省略した場合は
"execution expired" になります.
例 長い計算のタイムアウト
require 'timeout'
def calc_p......y = rand
x**2 + y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end
end
t = 5
min = [ 0, 0]
begin
Timeout.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end
printf "%d: pi = %f\n", min[0] + min[1], min[0]*4.0/(min[0]+min[1])
#例
#=> 417... -
Timeout
. # timeout(sec , exception _ class , message) {|i| . . . } -> object (9249.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...c 秒の期限付きで実行します。
ブロックの実行時間が制限を過ぎたときは例外
Timeout::Error が発生します。
exception_class を指定した場合には Timeout::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がはい.......
@param exception_class タイムアウトした時、発生させる例外を指定します.
@param message エラーメッセージを指定します.省略した場合は
"execution expired" になります.
例 長い計算のタイムアウト
require 'timeout'
def calc_p......y = rand
x**2 + y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end
end
t = 5
min = [ 0, 0]
begin
Timeout.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end
printf "%d: pi = %f\n", min[0] + min[1], min[0]*4.0/(min[0]+min[1])
#例
#=> 417... -
ObjectSpace
. # count _ objects _ size(result _ hash = nil) -> Hash (9225.0) -
型ごとのオブジェクトサイズをバイト単位で格納したハッシュを返します。
...バイト単位で格納したハッシュを返します。
@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プローブ......て扱う必要があります。特に T_DATA の合計値は正しくないでしょう。
//emlist[例][ruby]{
ObjectSpace.count_objects_size
# => {:TOTAL=>1461154, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249, ...}
//}
@raise TypeError result_hash にハッシュ以外を指定した... -
ObjectSpace
. # count _ tdata _ objects(result _ hash = nil) -> Hash (9217.0) -
T_DATA の種類ごとにオブジェクトの数を格納したハッシュを返します。
...
T_DATA の種類ごとにオブジェクトの数を格納したハッシュを返します。
@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き......raise TypeError result_hash にハッシュ以外を指定した時に発生します。
本メソッドは普通の Ruby プログラマ向けのメソッドではありません。パフォー
マンスに興味のある C Ruby の開発者向けのものです。
//emlist[例][ruby]{
ObjectSpac......e.count_tdata_objects
# => {RubyVM::InstructionSequence=>504, :parser=>5, :barrier=>6,
# :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99,
# ThreadGroup=>1, Binding=>1, Thread=>1, RubyVM=>1, :iseq=>1,
# Random=>1, ARGF.class=>1, Data=>1, :autoload=>3, Time=>2}
//}
現在の... -
ObjectSpace
. # count _ objects(result _ hash = {}) -> Hash (9213.0) -
オブジェクトを種類ごとにカウントした結果を Hash として返します。
...esult_hash ハッシュを指定します。与えられたハッシュは上書きして返されます。
これを利用すると測定による影響を避けることができます。
@raise TypeError 引数に Hash 以外を与えた場合、発生します。
//emlist[......例][ruby]{
ObjectSpace.count_objects # => {:TOTAL=>10000, :FREE=>3011, :T_OBJECT=>6, :T_CLASS=>404, ...}
//}... -
ERB
:: DefMethod . # def _ erb _ method(methodname , erb) -> nil (9201.0) -
self に erb のスクリプトをメソッドとして定義します。
...をメソッドとして定義します。
メソッド名は methodname で指定します。
erb が文字列の時、そのファイルを読み込み ERB で変換したのち、メソッドとして定義します。
@param methodname メソッド名
@param erb ERBインスタンスもしく......はERBソースファイル名
例:
require 'erb'
class Writer
extend ERB::DefMethod
def_erb_method('to_html', 'writer.erb')
...
end
...
puts writer.to_html... -
WEBrick
:: Utils . # create _ listeners(address , port , logger = nil) -> [TCPServer] (9201.0) -
与えられたアドレスとポートで TCPServer オブジェクトを生成し ます。
...アドレスとポートで TCPServer オブジェクトを生成し
ます。
@param address アドレスを指定します。
@param port ポート番号を指定します。
@param logger ロガーオブジェクトを指定します。
@raise ArgumentError port を指定しなかった場合......に発生します。
@see Socket.getaddrinfo, TCPServer... -
ObjectSpace
. # reachable _ objects _ from(obj) -> Array | nil (9107.0) -
obj から到達可能なすべてのオブジェクトを返します。マーク不能なオブジェ クトを指定した場合は nil を返します。本メソッドを使う事でメモリリークの 調査が行えます。
...します。本メソッドを使う事でメモリリークの
調査が行えます。
//emlist[例][ruby]{
# 配列クラス(Array)と 'a'、'b'、'c' に到達可能。
ObjectSpace.reachable_objects_from(['a', 'b', 'c'])
# => [Array, 'a', 'b', 'c']
//}
obj が 2 つ以上の同じオブジェ......だけです。
//emlist[例][ruby]{
# 配列クラス(Array)と v に到達可能。
ObjectSpace.reachable_objects_from([v = 'a', v, v])
# => [Array, 'a']
# 配列クラス(Array)と 3 つの異なる 'a' オブジェクトに到達可能。
ObjectSpace.reachable_objects_from(['a', 'a', 'a'])
# =......(true、false、nil、Symbol、
Fixnum、Flonum(即値の Float オブジェクト))を指定した場合は
nil を返します。
//emlist[例][ruby]{
# 1 はマーク不能
ObjectSpace.reachable_objects_from(1)
# => nil
//}
obj が内部でオブジェクトへの参照を持つ場合、
Object... -
DRb
:: DRbProtocol . # add _ protocol(prot) -> () (9101.0) -
新たなプロトコルを DRbProtocol モジュールに登録します。
...新たなプロトコルを DRbProtocol モジュールに登録します。
@param prot プロトコル定義クラス...