ライブラリ
- ビルトイン (2295)
- abbrev (12)
- base64 (72)
- benchmark (60)
- bigdecimal (48)
-
bigdecimal
/ jacobian (36) -
bigdecimal
/ ludcmp (24) -
bigdecimal
/ math (72) -
bigdecimal
/ newton (12) - cmath (240)
- continuation (12)
- digest (12)
- drb (96)
- erb (24)
- etc (252)
- fiddle (48)
- fileutils (535)
- find (24)
- json (156)
- kconv (156)
- mathn (8)
- nkf (24)
- objspace (132)
- open-uri (16)
- open3 (216)
- openssl (420)
- pp (4)
- profiler (12)
- pty (48)
- readline (12)
- rubygems (48)
- shellwords (36)
- syslog (192)
- 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 (12) - zlib (65)
クラス
-
Win32
:: Resolv (12)
モジュール
- Abbrev (12)
- Base64 (72)
- Benchmark (60)
- BigMath (96)
- CMath (240)
- DRb (84)
-
DRb
:: DRbProtocol (12) - Digest (12)
-
ERB
:: Util (24) - Etc (252)
- Fiddle (48)
- FileTest (96)
- FileUtils (535)
- Find (24)
- Gem (48)
- JSON (156)
- Jacobian (36)
- Kconv (156)
- Kernel (1089)
- LUSolve (24)
- Marshal (48)
- Math (80)
- NKF (24)
- Newton (12)
- ObjectSpace (252)
- Open3 (216)
-
OpenSSL
:: ASN1 (396) -
OpenSSL
:: PKCS5 (24) - PTY (48)
- Process (458)
-
Process
:: GID (132) -
Process
:: Sys (180) -
Process
:: UID (132) -
Profiler
_ _ (12) - Readline (12)
- Shellwords (36)
- Signal (36)
- Syslog (168)
-
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 (65)
キーワード
- Array (12)
- BMPString (12)
- BigDecimal (24)
- BitString (12)
- Boolean (12)
- CloseKey (12)
- Complex (24)
- CreateKey (12)
- DeleteKey (12)
- DeleteValue (12)
- E (12)
- EnumKey (12)
- EnumValue (12)
- Enumerated (12)
- Float (12)
- FlushKey (12)
- GeneralString (12)
- GeneralizedTime (12)
- GraphicString (24)
- Hash (12)
- IA5String (12)
- ISO64String (12)
- Integer (36)
-
LOG
_ MASK (12) -
LOG
_ UPTO (12) - Null (12)
- NumericString (24)
- ObjectId (24)
- OctetString (24)
- OpenKey (12)
- PI (12)
- PrintableString (12)
- QueryInfoKey (12)
- QueryValue (12)
- Rational (12)
- Sequence (24)
- Set (24)
- SetValue (12)
- String (12)
- T61String (12)
- URI (12)
- UTCTime (24)
- UTF8String (12)
- UniversalString (12)
- VideotexString (12)
-
_ _ callee _ _ (12) -
_ id2ref (12) - ` (12)
- abbrev (12)
- abort (24)
- acos (18)
- acos! (6)
- acosh (18)
- acosh! (6)
-
add
_ protocol (12) -
adler32
_ combine (12) -
allocation
_ sourcefile (12) -
allocation
_ sourceline (12) - argv0 (12)
- asin (6)
- asin! (6)
- asinh (6)
- asinh! (6)
-
at
_ exit (12) - atan (18)
- atan! (6)
- atan2 (6)
- atan2! (6)
- atanh (6)
- atanh! (6)
- autoload (12)
- autoload? (12)
-
basic
_ auth (12) - benchmark (12)
- binding (12)
-
block
_ given? (12) - blockdev? (12)
- bm (12)
- bmbm (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) - close (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) - daemon (12)
- decode (12)
- decode64 (12)
-
decode
_ all (12) -
define
_ finalizer (24) - deflate (12)
- dequote (12)
- detach (12)
- dfdxi (12)
- directory? (12)
- dlopen (12)
- dlunwrap (12)
- dump (36)
-
each
_ object (48) - egid (12)
- egid= (12)
- eid (24)
- eid= (24)
- encode64 (12)
- endgrent (12)
- endpwent (12)
-
ensure
_ gem _ subdirectories (12) - erfc (12)
- error? (12)
- escape (36)
- escape8bit (12)
-
escape
_ path (12) - euid (12)
- euid= (12)
- eval (24)
- exec (48)
- executable? (12)
-
executable
_ real? (12) - exit (12)
- exit! (12)
- exp (18)
- exp! (6)
- facility (12)
- fail (36)
-
fast
_ generate (12) -
fast
_ unparse (12) - find (24)
- format (24)
-
from
_ name (24) - front (12)
-
garbage
_ collect (12) - generate (12)
-
get
_ hosts _ path (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)
- gid (12)
- gid= (12)
-
grant
_ privilege (24) - group (24)
- groups (12)
- groups= (12)
- gsub (24)
- guess (24)
- hexencode (12)
-
html
_ escape (12) - ident (12)
- identical? (24)
- info? (12)
- initgroups (12)
- install (12)
-
install
_ acl (12) -
install
_ id _ conv (12) - instance (12)
- isEqual (12)
- iseuc (12)
- isjis (12)
- issetugid (12)
- issjis (12)
- isutf8 (12)
- iterator? (12)
- jacobian (12)
- kconv (12)
- kill (12)
- lambda (18)
- link (12)
- list (12)
- ln (12)
-
ln
_ s (12) -
ln
_ sf (12) - load (24)
-
load
_ file (12) -
load
_ file! (12) -
load
_ mime _ types (12) -
local
_ variables (12) - log (36)
- log! (12)
- log10 (6)
- log10! (6)
- log2 (6)
- log2! (6)
- loop (24)
- ludecomp (12)
- lusolve (12)
- makedirs (12)
- malloc (12)
-
marshal
_ version (12) - mask (12)
- mask= (12)
- maxgroups (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)
- notice (12)
- nprocessors (12)
- open (64)
- open! (12)
- p (12)
- packdw (12)
- packqw (12)
- parse (12)
- parse! (12)
-
parse
_ header (12) -
parse
_ range _ header (12) - passwd (24)
-
pbkdf2
_ hmac (12) -
pbkdf2
_ hmac _ sha1 (12) - pid (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)
-
pretty
_ generate (12) -
pretty
_ unparse (12) -
print
_ profile (6) - printf (24)
- proc (19)
-
proxy
_ basic _ auth (12) - putc (12)
- quote (12)
- raise (36)
- rand (24)
-
random
_ string (12) -
re
_ exchange (24) -
re
_ exchangeable? (24) -
reachable
_ objects _ from (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)
- restore (24)
- rid (24)
- rm (12)
-
rm
_ f (12) -
rm
_ r (12) -
rm
_ rf (12) - rmdir (12)
- rmtree (12)
- rsqrt (4)
-
safe
_ unlink (12) - select (12)
-
server
_ error? (12) -
set
_ close _ on _ exec (12) -
set
_ non _ blocking (12) -
set
_ trace _ func (12) - setegid (12)
- seteuid (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)
-
setup
_ params (12) - shellescape (12)
- shellsplit (12)
- shellwords (12)
-
sid
_ available? (24) - sin (18)
- sin! (6)
- sinh (6)
- sinh! (6)
- sleep (12)
- socket? (12)
-
source
_ index (12) - spawn (72)
-
split
_ header _ value (12) - sprintf (12)
- sqrt (22)
- sqrt! (6)
- srand (24)
-
start
_ profile (6) -
start
_ service (12) - sticky? (12)
-
stop
_ service (12) -
strict
_ decode64 (12) -
strict
_ encode64 (12) - su (12)
- sub (24)
- success? (12)
- switch (48)
- symlink (12)
- syscall (12)
- sysconf (12)
- sysconfdir (12)
- system (24)
- systmpdir (12)
- tan (6)
- tan! (6)
- tanh (6)
- tanh! (6)
- test (24)
- 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)
- uid (12)
- uid= (12)
- uname (12)
-
undefine
_ finalizer (12) - unescape (12)
- unpackdw (12)
- unpackqw (12)
- unparse (12)
-
untrace
_ var (12) - uptodate? (12)
-
url
_ encode (12) -
urlsafe
_ decode64 (12) -
urlsafe
_ encode64 (12) - wait (12)
- wait2 (12)
- waitall (12)
- waitpid (12)
- waitpid2 (12)
- warmup (2)
- warn (4)
検索結果
先頭5件
- Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil - Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil - Kconv
. # kconv(str , out _ code , in _ code = Kconv :: AUTO) -> String - Benchmark
. # benchmark(caption = "" , label _ width = nil , fmtstr = nil , *labels) {|rep| . . . } -> [Benchmark :: Tms] - ObjectSpace
. # each _ object -> Enumerator
-
Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil (12329.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@pa......uby]{
def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_locations # => []
test3(1, nil)
# =>......(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}
@see Thread::Backtrace::Location, Kernel.#caller... -
Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil (12329.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@pa......uby]{
def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_locations # => []
test3(1, nil)
# =>......(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}
@see Thread::Backtrace::Location, Kernel.#caller... -
Kconv
. # kconv(str , out _ code , in _ code = Kconv :: AUTO) -> String (9401.0) -
文字列 str のエンコーディングを out_code に変換したものを 返します。in_code も指定されていたら str のエンコーディングが in_code だとして動作します。
...文字列 str のエンコーディングを out_code に変換したものを
返します。in_code も指定されていたら str のエンコーディングが
in_code だとして動作します。
このメソッドはMIME エンコードされた文字列を展開し、
いわゆる半角......カナを全角に変換します。
これらを変換したくない場合は、 NKF.#nkf を使ってください。
@param str 変換元の文字列
@param out_code 変換後のエンコーディング
@param in_code strのエンコーディング
@see String#kconv... -
Benchmark
. # benchmark(caption = "" , label _ width = nil , fmtstr = nil , *labels) {|rep| . . . } -> [Benchmark :: Tms] (9229.0) -
Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
...Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
基本的には以下のように使います。
ブロックが Benchmark::Tms オブジェクトの配列を返した場合は、
それらの数値も追加の行に表示......れます。
@param caption レポートの一行目に表示する文字列を指定します。
@param label_width ラベルの幅を指定します。
@param fmtstr フォーマット文字列を指定します。
この引数を省略すると Benchmark::FORMAT が......ロックが Benchmark::Tms オブジェクトの配列を返す場合に指定します。
=== フォーマット文字列
フォーマット文字列として以下が使用できます。
: %u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き... -
ObjectSpace
. # each _ object -> Enumerator (9155.0) -
指定された klass と Object#kind_of? の関係にある全ての オブジェクトに対して繰り返します。引数が省略された時には全てのオブ ジェクトに対して繰り返します。 繰り返した数を返します。
...指定された klass と Object#kind_of? の関係にある全ての
オブジェクトに対して繰り返します。引数が省略された時には全てのオブ
ジェクトに対して繰り返します。
繰り返した数を返します。
ブロックが与えられなかった場合......ブジェクトを返します。
次のクラスのオブジェクトについては繰り返しません
* Fixnum
* Symbol
* TrueClass
* FalseClass
* NilClass
とくに、klass に Fixnum や Symbol などのクラスを指定した場合は、
何も繰り返さないことになります......uby]{
p ObjectSpace.each_object
# => #<Enumerator: ObjectSpace:each_object(false)>
//}
//emlist[例: 全てのオブジェクトを扱う][ruby]{
ObjectSpace.each_object.take(5).each { |x| p x }
count = ObjectSpace.each_object { |x| x }
puts "Total count: #{count}"
# => "scope"
# => "scopes"
# =>... -
ObjectSpace
. # each _ object {|object| . . . } -> Integer (9155.0) -
指定された klass と Object#kind_of? の関係にある全ての オブジェクトに対して繰り返します。引数が省略された時には全てのオブ ジェクトに対して繰り返します。 繰り返した数を返します。
...指定された klass と Object#kind_of? の関係にある全ての
オブジェクトに対して繰り返します。引数が省略された時には全てのオブ
ジェクトに対して繰り返します。
繰り返した数を返します。
ブロックが与えられなかった場合......ブジェクトを返します。
次のクラスのオブジェクトについては繰り返しません
* Fixnum
* Symbol
* TrueClass
* FalseClass
* NilClass
とくに、klass に Fixnum や Symbol などのクラスを指定した場合は、
何も繰り返さないことになります......uby]{
p ObjectSpace.each_object
# => #<Enumerator: ObjectSpace:each_object(false)>
//}
//emlist[例: 全てのオブジェクトを扱う][ruby]{
ObjectSpace.each_object.take(5).each { |x| p x }
count = ObjectSpace.each_object { |x| x }
puts "Total count: #{count}"
# => "scope"
# => "scopes"
# =>... -
ObjectSpace
. # each _ object(klass) -> Enumerator (9155.0) -
指定された klass と Object#kind_of? の関係にある全ての オブジェクトに対して繰り返します。引数が省略された時には全てのオブ ジェクトに対して繰り返します。 繰り返した数を返します。
...指定された klass と Object#kind_of? の関係にある全ての
オブジェクトに対して繰り返します。引数が省略された時には全てのオブ
ジェクトに対して繰り返します。
繰り返した数を返します。
ブロックが与えられなかった場合......ブジェクトを返します。
次のクラスのオブジェクトについては繰り返しません
* Fixnum
* Symbol
* TrueClass
* FalseClass
* NilClass
とくに、klass に Fixnum や Symbol などのクラスを指定した場合は、
何も繰り返さないことになります......uby]{
p ObjectSpace.each_object
# => #<Enumerator: ObjectSpace:each_object(false)>
//}
//emlist[例: 全てのオブジェクトを扱う][ruby]{
ObjectSpace.each_object.take(5).each { |x| p x }
count = ObjectSpace.each_object { |x| x }
puts "Total count: #{count}"
# => "scope"
# => "scopes"
# =>... -
ObjectSpace
. # each _ object(klass) {|object| . . . } -> Integer (9155.0) -
指定された klass と Object#kind_of? の関係にある全ての オブジェクトに対して繰り返します。引数が省略された時には全てのオブ ジェクトに対して繰り返します。 繰り返した数を返します。
...指定された klass と Object#kind_of? の関係にある全ての
オブジェクトに対して繰り返します。引数が省略された時には全てのオブ
ジェクトに対して繰り返します。
繰り返した数を返します。
ブロックが与えられなかった場合......ブジェクトを返します。
次のクラスのオブジェクトについては繰り返しません
* Fixnum
* Symbol
* TrueClass
* FalseClass
* NilClass
とくに、klass に Fixnum や Symbol などのクラスを指定した場合は、
何も繰り返さないことになります......uby]{
p ObjectSpace.each_object
# => #<Enumerator: ObjectSpace:each_object(false)>
//}
//emlist[例: 全てのオブジェクトを扱う][ruby]{
ObjectSpace.each_object.take(5).each { |x| p x }
count = ObjectSpace.each_object { |x| x }
puts "Total count: #{count}"
# => "scope"
# => "scopes"
# =>... -
ObjectSpace
. # reachable _ objects _ from(obj) -> Array | nil (9149.0) -
obj から到達可能なすべてのオブジェクトを返します。マーク不能なオブジェ クトを指定した場合は nil を返します。本メソッドを使う事でメモリリークの 調査が行えます。
...リークの
調査が行えます。
//emlist[例][ruby]{
# 配列クラス(Array)と 'a'、'b'、'c' に到達可能。
ObjectSpace.reachable_objects_from(['a', 'b', 'c'])
# => [Array, 'a', 'b', 'c']
//}
obj が 2 つ以上の同じオブジェクト x への参照を持つ場合、戻り値に......ruby]{
# 配列クラス(Array)と v に到達可能。
ObjectSpace.reachable_objects_from([v = 'a', v, v])
# => [Array, 'a']
# 配列クラス(Array)と 3 つの異なる 'a' オブジェクトに到達可能。
ObjectSpace.reachable_objects_from(['a', 'a', 'a'])
# => [Array, 'a', 'a', 'a']
//}
o......合は
nil を返します。
//emlist[例][ruby]{
# 1 はマーク不能
ObjectSpace.reachable_objects_from(1)
# => nil
//}
obj が内部でオブジェクトへの参照を持つ場合、
ObjectSpace::InternalObjectWrapper オブジェクトが戻り値に含まれます。こ
のオブジェク...