ライブラリ
モジュール
- Abbrev (12)
- Base64 (24)
- Benchmark (48)
- BigMath (96)
- CMath (36)
- Digest (12)
-
ERB
:: Util (48) - Etc (84)
- Fiddle (48)
- FileTest (174)
- FileUtils (391)
- Gem (24)
- JSON (156)
- Kconv (12)
- Kernel (1019)
- LUSolve (12)
- Marshal (48)
- Math (60)
- ObjectSpace (192)
- Open3 (12)
-
OpenSSL
:: ASN1 (468) - Process (84)
- Readline (12)
- Signal (24)
- Timeout (21)
キーワード
- BMPString (24)
- BigDecimal (24)
- BitString (24)
- Boolean (12)
- Complex (24)
- E (12)
- Enumerated (12)
- Float (7)
- GeneralString (24)
- GeneralizedTime (24)
- GraphicString (24)
- IA5String (24)
- ISO64String (24)
- Integer (36)
- Null (12)
- NumericString (24)
- ObjectId (24)
- OctetString (24)
- PI (12)
- PrintableString (24)
- Rational (12)
- Sequence (12)
- Set (12)
- String (12)
- T61String (24)
- UTCTime (24)
- UTF8String (24)
- UniversalString (24)
- VideotexString (24)
-
_ _ callee _ _ (12) -
_ _ method _ _ (12) -
_ id2ref (12) - ` (12)
- abbrev (12)
-
allocation
_ sourcefile (12) -
allocation
_ sourceline (12) - argv0 (12)
- asin (12)
-
at
_ exit (12) - atan (12)
- autoload (12)
- autoload? (12)
- benchmark (12)
- binding (12)
-
block
_ given? (12) - bm (12)
- bmbm (12)
- caller (36)
-
caller
_ locations (24) - catch (24)
- cbrt (6)
- cd (24)
- chdir (24)
- chmod (12)
-
chmod
_ R (12) - chomp (12)
- chop (12)
- chown (12)
-
chown
_ R (12) - cmp (12)
-
compare
_ file (12) - confstr (12)
- copy (12)
- cos (12)
-
count
_ nodes (12) -
count
_ objects _ size (12) -
count
_ tdata _ objects (12) - cp (12)
-
cp
_ lr (7) -
cp
_ r (12) -
define
_ finalizer (24) - dlunwrap (12)
- dlwrap (12)
- dump (36)
-
each
_ object (24) - empty? (9)
- encode64 (12)
- eval (12)
- exec (48)
-
executable
_ real? (12) - exists? (9)
- exit (12)
- exit! (12)
- exp (18)
- fail (36)
-
fast
_ generate (12) -
fast
_ unparse (12) - fork (24)
- format (12)
- free (12)
- frexp (12)
- gamma (12)
-
garbage
_ collect (12) - generate (12)
- getlogin (12)
- gets (12)
-
global
_ variables (12) - groups (12)
- grpowned? (12)
- gsub (24)
- h (12)
- hexencode (12)
-
html
_ escape (12) - identical? (24)
- install (12)
- isjis (12)
- iterator? (12)
- lgamma (12)
- link (12)
- ln (12)
-
ln
_ s (12) - load (36)
-
load
_ file (12) -
load
_ file! (12) -
local
_ variables (12) - log (24)
- loop (12)
- lusolve (12)
- makedirs (12)
- malloc (12)
-
memsize
_ of (12) -
memsize
_ of _ all (12) - mkdir (12)
-
mkdir
_ p (12) - mkpath (12)
- move (12)
- mv (12)
- nprocessors (12)
- open (28)
- owned? (12)
- parse (12)
- parse! (12)
- pipeline (12)
-
pretty
_ generate (12) -
pretty
_ unparse (12) - print (12)
- printf (24)
- puts (12)
- raise (36)
- rand (24)
-
reachable
_ objects _ from (12) - readable? (12)
- readline (24)
- readlines (12)
- realtime (12)
- remove (12)
-
remove
_ entry (12) - require (12)
-
require
_ relative (12) - restore (24)
- rm (12)
-
rm
_ r (12) - rmdir (12)
- setgid? (12)
- setproctitle (12)
- setuid? (12)
- sin (24)
- sin! (6)
- size? (12)
- sleep (24)
- socket? (12)
- spawn (48)
- sprintf (12)
- sqrt (18)
- srand (24)
- sticky? (12)
- sub (24)
- symlink (12)
- symlink? (12)
- syscall (12)
- sysconf (12)
- sysconfdir (12)
- system (48)
- systmpdir (12)
- test (24)
- throw (12)
- timeout (21)
- touch (12)
-
trace
_ object _ allocations (12) -
trace
_ var (36) - trap (24)
- u (12)
- uname (12)
-
undefine
_ finalizer (12) - unparse (12)
-
untrace
_ var (12) - uptodate? (12)
-
url
_ encode (12) -
urlsafe
_ encode64 (12) - wait (12)
- wait2 (12)
- waitpid (12)
- waitpid2 (12)
- warn (12)
-
win
_ platform? (12) - writable? (12)
- zero? (12)
検索結果
先頭5件
- Gem
. # ruby -> String - OpenSSL
:: ASN1 . # PrintableString(value) -> OpenSSL :: ASN1 :: PrintableString -> OpenSSL :: ASN1 :: PrintableString - OpenSSL
:: ASN1 . # PrintableString(value , tag , tagging , tag _ class) -> OpenSSL :: ASN1 :: PrintableString - Kernel
. # binding -> Binding - ObjectSpace
. # define _ finalizer(obj) {|id| . . . } -> Array
-
Gem
. # ruby -> String (18218.0) -
実行中のRubyインタプリタのパスを返します。
...実行中のRubyインタプリタのパスを返します。... -
OpenSSL
:: ASN1 . # PrintableString(value) -> OpenSSL :: ASN1 :: PrintableString -> OpenSSL :: ASN1 :: PrintableString (12623.0) -
ASN.1 の PrintableString 型の値を表現する Ruby のオブジェクトを 生成します。
....1 の PrintableString 型の値を表現する Ruby のオブジェクトを
生成します。
OpenSSL::ASN1::PrintableString.new と同じです。
@param value ASN.1 値を表す Ruby のオブジェクト(文字列)
@param tag タグ番号
@param tagging タグ付けの方法(:IMPLICIT もし......くは :EXPLICIT)
@param tag_class タグクラス(:UNIVERSAL, :CONTEXT_SPECIFIC, :APPLICATION, :PRIVATE のいずれか)... -
OpenSSL
:: ASN1 . # PrintableString(value , tag , tagging , tag _ class) -> OpenSSL :: ASN1 :: PrintableString (12523.0) -
ASN.1 の PrintableString 型の値を表現する Ruby のオブジェクトを 生成します。
....1 の PrintableString 型の値を表現する Ruby のオブジェクトを
生成します。
OpenSSL::ASN1::PrintableString.new と同じです。
@param value ASN.1 値を表す Ruby のオブジェクト(文字列)
@param tag タグ番号
@param tagging タグ付けの方法(:IMPLICIT もし......くは :EXPLICIT)
@param tag_class タグクラス(:UNIVERSAL, :CONTEXT_SPECIFIC, :APPLICATION, :PRIVATE のいずれか)... -
Kernel
. # binding -> Binding (12407.0) -
変数・メソッドなどの環境情報を含んだ Binding オブジェクトを 生成して返します。通常、Kernel.#eval の第二引数として使います。
...変数・メソッドなどの環境情報を含んだ Binding オブジェクトを
生成して返します。通常、Kernel.#eval の第二引数として使います。
//emlist[例][ruby]{
def foo
a = 1
binding
end
eval("p a", foo) #=> 1
//}
@see Kernel.#eval,Object::TOPLEVEL_BINDING... -
ObjectSpace
. # define _ finalizer(obj) {|id| . . . } -> Array (12219.0) -
obj が解放されるときに実行されるファイナライザ proc を 登録します。同じオブジェクトについて複数回呼ばれたときは置き換えで はなく追加登録されます。固定値 0 と proc を配列にして返します。
...ロックを指定した場合は、そのブロックがファイナライザになります。
obj の回収時にブロックは obj の ID (BasicObject#__id__)を引数とし
て実行されます。
しかし、後述の問題があるのでブロックでファイナライザを登録するの......す。proc は obj の回収時に obj の ID を引数として実行されます。
=== 使い方の注意
以下は、define_finalizer の使い方の悪い例です。
//emlist[悪い例][ruby]{
class Foo
def initialize
ObjectSpace.define_finalizer(self) {
puts "foo"
}
end
e......file は、ファイナライザの使い方の
良い例になっています。これは、クラスのコンテキストで Proc を
生成することで上記の問題を回避しています。
//emlist[例][ruby]{
class Bar
def Bar.callback
proc {
puts "bar"
}
end
def ini... -
ObjectSpace
. # define _ finalizer(obj , proc) -> Array (12219.0) -
obj が解放されるときに実行されるファイナライザ proc を 登録します。同じオブジェクトについて複数回呼ばれたときは置き換えで はなく追加登録されます。固定値 0 と proc を配列にして返します。
...ロックを指定した場合は、そのブロックがファイナライザになります。
obj の回収時にブロックは obj の ID (BasicObject#__id__)を引数とし
て実行されます。
しかし、後述の問題があるのでブロックでファイナライザを登録するの......す。proc は obj の回収時に obj の ID を引数として実行されます。
=== 使い方の注意
以下は、define_finalizer の使い方の悪い例です。
//emlist[悪い例][ruby]{
class Foo
def initialize
ObjectSpace.define_finalizer(self) {
puts "foo"
}
end
e......file は、ファイナライザの使い方の
良い例になっています。これは、クラスのコンテキストで Proc を
生成することで上記の問題を回避しています。
//emlist[例][ruby]{
class Bar
def Bar.callback
proc {
puts "bar"
}
end
def ini... -
Kconv
. # isjis(str) -> bool (12207.0) -
文字列 str が ISO-2022-JP なバイト列として正当であるかどうかを判定します。
...文字列 str が ISO-2022-JP なバイト列として正当であるかどうかを判定します。
@param str 判定対象の文字列
@see String#isjis
//emlist[例][ruby]{
require 'kconv'
euc_str = "\
\xa5\xaa\xa5\xd6\xa5\xb8\xa5\xa7\xa5\xaf\xa5\xc8\xbb\xd8\xb8\xfe\
\xa5\xd7\xa5\xed\xa5\xb0......force_encoding('EUC-JP')
jis_str = "\
\x1b\x24\x42\x25\x2a\x25\x56\x25\x38\x25\x27\x25\x2f\x25\x48\x3b\x58\x38\x7e\
\x25\x57\x25\x6d\x25\x30\x25\x69\x25\x5f\x25\x73\x25\x30\x38\x40\x38\x6c\x1b\x28\x42\
\x52\x75\x62\x79".force_encoding('ISO-2022-JP')
euc_str.isjis # => false
jis_str.isjis # => tr... -
ObjectSpace
. # undefine _ finalizer(obj) -> object (12207.0) -
obj に対するファイナライザをすべて解除します。 obj を返します。
...す。
//emlist[例][ruby]{
class Sample
def Sample.callback
proc {
puts "finalize"
}
end
def initialize
ObjectSpace.define_finalizer(self, Sample.callback)
end
def undef
ObjectSpace.undefine_finalizer(self)
end
end
Sample.new
GC.start
# => finalize
Sample.new......sample.undef
GC.start
# ※何も出力されない
//}
@see ObjectSpace.#define_finalizer... -
FileUtils
. # chdir(dir , options = {}) {|dir| . . . . } -> nil (9307.0) -
プロセスのカレントディレクトリを dir に変更します。
...dir に変更します。
ブロックとともに呼び出された時はブロック終了後に
元のディレクトリに戻ります。
@param dir ディレクトリを指定します。
@param options :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{......require 'fileutils'
FileUtils.cd('/', verbose: true) # chdir and report it
//}...