3116件ヒット
[1-100件を表示]
(0.167秒)
クラス
- Array (44)
- Complex (22)
- Data (4)
- Dir (323)
- Encoding (99)
-
Encoding
:: Converter (66) - Enumerator (23)
-
Enumerator
:: Chain (6) -
Enumerator
:: Lazy (11) - Exception (22)
- Fiber (22)
- File (686)
-
File
:: Stat (11) - FrozenError (5)
- Hash (22)
- IO (374)
- KeyError (12)
- Module (11)
- NameError (17)
- NoMethodError (17)
- Random (92)
- Range (11)
- Regexp (44)
-
RubyVM
:: InstructionSequence (84) - SignalException (33)
- String (16)
- Struct (17)
- SystemExit (11)
- Thread (181)
-
Thread
:: ConditionVariable (9) -
Thread
:: Queue (3) -
Thread
:: SizedQueue (9) - Time (149)
- TracePoint (32)
モジュール
- GC (71)
-
GC
:: Profiler (77) - Process (40)
-
RubyVM
:: AbstractSyntaxTree (18) -
RubyVM
:: MJIT (12) - Warning (18)
キーワード
- DEBUG (11)
- [] (27)
- []= (5)
-
abort
_ on _ exception (11) -
abort
_ on _ exception= (11) -
absolute
_ path (11) -
absolute
_ path? (5) - aliases (11)
-
asciicompat
_ encoding (22) - assoc (11)
- at (47)
- atime (11)
- basename (11)
- binread (11)
- binwrite (11)
- birthtime (10)
- blockdev? (11)
- bytes (6)
- chardev? (11)
- chdir (33)
- children (14)
- chmod (11)
- chown (11)
- chroot (11)
- clear (11)
- compatible? (11)
- compile (11)
-
compile
_ option (11) -
copy
_ stream (22) - ctime (11)
-
default
_ external (11) -
default
_ external= (11) -
default
_ internal (11) -
default
_ internal= (11) - define (4)
-
define
_ method (22) - delete (22)
-
delete
_ if (22) - directory? (11)
- dirname (11)
- disable (22)
- disasm (11)
- disassemble (11)
-
each
_ child (28) -
each
_ pair (22) - empty? (16)
- enable (11)
- enabled? (17)
- entries (22)
- escape (11)
- exception (11)
- exclusive (11)
- executable? (11)
-
executable
_ real? (11) - exist? (22)
- exists? (18)
- exit (22)
- exit! (11)
- extname (11)
- fetch (11)
- file? (11)
- filter (12)
- filter! (12)
- find (11)
- fnmatch (11)
- fnmatch? (11)
- foreach (66)
- fork (11)
- ftype (11)
- glob (22)
- gm (22)
- grpowned? (11)
-
handle
_ interrupt (11) - identical? (11)
- include (11)
- include? (11)
- index (7)
- inspect (11)
- invert (11)
- join (11)
-
keep
_ if (22) - key (11)
-
keyword
_ init? (3) - kill (11)
-
last
_ match (11) -
last
_ status (7) -
latest
_ gc _ info (22) - lchmod (11)
- lchown (11)
- left (11)
- list (11)
-
load
_ from _ binary (9) -
load
_ from _ binary _ extra _ data (9) - local (22)
-
locale
_ charmap (11) - lstat (11)
- lutime (7)
- main (11)
- mkdir (11)
- mkfifo (9)
- mktime (22)
- mtime (11)
-
name
_ list (11) - nesting (11)
- new (371)
-
new
_ seed (11) - of (13)
- open (66)
- owned? (11)
- parse (8)
-
parse
_ file (8) - pass (11)
- path (11)
- pause (6)
-
pending
_ interrupt? (11) - pipe (88)
- pipe? (11)
- polar (11)
- popen (110)
- private (23)
- produce (5)
- public (23)
- quote (11)
- rand (22)
- rassoc (11)
-
raw
_ data (11) -
raw
_ seed (2) - read (33)
- readable? (11)
-
readable
_ real? (11) - readlines (33)
- readlink (11)
- realdirpath (11)
- realpath (11)
- rectangular (11)
- rehash (11)
- reject! (22)
- rename (11)
-
report
_ on _ exception (8) -
report
_ on _ exception= (8) - result (11)
- rmdir (11)
-
search
_ convpath (11) - select (23)
- select! (22)
- setgid? (11)
- setuid? (11)
- size (11)
- size? (11)
- slice (6)
- socket? (11)
- spawn (11)
- split (11)
- srand (22)
- start (22)
- stat (43)
- state (11)
- sticky? (11)
- stop (11)
- store (11)
- symlink? (11)
- sysopen (11)
-
to
_ a (11) -
to
_ s (11) -
total
_ time (11) - trace (11)
- truncate (11)
-
try
_ convert (22) - umask (22)
- union (11)
- unlink (22)
- urandom (7)
- using (11)
- utc (22)
- utime (11)
- values (11)
-
values
_ at (11) -
verify
_ compaction _ references (5) - warn (8)
-
world
_ readable? (11) -
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11) - write (22)
- yield (11)
- zero? (11)
検索結果
先頭5件
- RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence - RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String - Encoding
. default _ internal -> Encoding | nil - Encoding
. default _ internal=(encoding) - Encoding
:: Converter . asciicompat _ encoding(encoding) -> Encoding | nil
-
RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (15403.0) -
RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
...RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
このローダーは検証機構をもっておらず、壊れたり改変されたバイナリを読み込むと深刻な問題を引き起......りません。自分が変換したバイナリデータを使うべきです。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary
RubyVM::InstructionSequence.load_from_binary(binary).eval # => 3
//}
@see RubyVM::InstructionSequence#to_binary... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (15403.0) -
バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。
...埋め込まれたextra_dataを取り出します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}
@see RubyVM::InstructionSequence#to_binary... -
Encoding
. default _ internal -> Encoding | nil (15303.0) -
既定の内部エンコーディングを返します。デフォルトでは nil です。
...ォルトでは nil です。
標準入出力、コマンドライン引数、open で開くファイルなどで、内部エンコーディングが指定されていない場合の既定値として利用されます。
String#encode と String#encode! は、引数に Encoding が与えられて......ault_internal を使用します。
文字列リテラルを作成した場合、エンコーディングには default_internal ではなく __ENCODING__ 特殊変数で参照できるスクリプトエンコーディングが使用されます。
default_internal は、ソースファイルの I......O.internal_encoding または -E オプションで初期化されます。
@see spec/rubycmd Encoding.default_external... -
Encoding
. default _ internal=(encoding) (15303.0) -
既定の内部エンコーディングを設定します。
...を設定します。
default_internal を変更する前に作成した文字列と、default_internal を変更した後に作成した文字列とではエンコーディングが異なる可能性があるため、Ruby スクリプト内で Encoding.default_internal を設定してはいけま......に、ruby -E を使用して、正しい default_internal で Ruby を起動してください。
デフォルトの内部エンコーディングがどのように使われるかについては Encoding.default_internal を参照してください。
@see spec/rubycmd Encoding.default_internal... -
Encoding
:: Converter . asciicompat _ encoding(encoding) -> Encoding | nil (15203.0) -
同じ文字集合を持つ ASCII 互換エンコーディングを返します。
... ASCII 互換エンコーディングを返します。
@param string エンコーディング名
@param encoding エンコーディングオブジェクト
@return ASCII 互換エンコーディングのオブジェクトか nil
引数とエンコーディングと同じ文字集合を持つ ASCI......I 互換エンコーディングを返します。引数と戻り値、2 つのエンコーディング間では変換しても未定義文字の例外は発生しません。
引数が ASCII 互換エンコーディングである場合や、エンコーディングでない場合は nil を返し......ます。
//emlist[][ruby]{
Encoding::Converter.asciicompat_encoding("ISO-2022-JP") #=> #<Encoding:stateless-ISO-2022-JP>
Encoding::Converter.asciicompat_encoding("UTF-16BE") #=> #<Encoding:UTF-8>
Encoding::Converter.asciicompat_encoding("UTF-8") #=> nil
//}... -
Encoding
:: Converter . asciicompat _ encoding(string) -> Encoding | nil (15203.0) -
同じ文字集合を持つ ASCII 互換エンコーディングを返します。
... ASCII 互換エンコーディングを返します。
@param string エンコーディング名
@param encoding エンコーディングオブジェクト
@return ASCII 互換エンコーディングのオブジェクトか nil
引数とエンコーディングと同じ文字集合を持つ ASCI......I 互換エンコーディングを返します。引数と戻り値、2 つのエンコーディング間では変換しても未定義文字の例外は発生しません。
引数が ASCII 互換エンコーディングである場合や、エンコーディングでない場合は nil を返し......ます。
//emlist[][ruby]{
Encoding::Converter.asciicompat_encoding("ISO-2022-JP") #=> #<Encoding:stateless-ISO-2022-JP>
Encoding::Converter.asciicompat_encoding("UTF-16BE") #=> #<Encoding:UTF-8>
Encoding::Converter.asciicompat_encoding("UTF-8") #=> nil
//}... -
Thread
. pending _ interrupt?(error = nil) -> bool (15203.0) -
非同期割り込みのキューが空かどうかを返します。
...す。
Thread.handle_interrupt は非同期割り込みの発生を延期させるのに使
用しますが、本メソッドは任意の非同期割り込みが存在するかどうかを確認す
るのに使用します。
本メソッドが true を返した場合、Thread.handle_interrupt で......@param error 対象の例外クラスを指定します。省略した場合は全ての例外を対
象に確認を行います。
例: 延期させられていた例外をただちに発生させる。
def Thread.kick_interrupt_immediately
Thread.handle_interrupt(Object => :im......diate) {
Thread.pass
}
end
=== 使い方
th = Thread.new{
Thread.handle_interrupt(RuntimeError => :on_blocking){
while true
...
# ここまでで割り込みが発生しても安全な状態になった。
if Thread.pending_interrupt?
Threa... -
Dir
. each _ child(path) {|file| . . . } -> nil (12403.0) -
ディレクトリ path の "." と ".." をのぞく各エントリを表す文字列を引数として、 ブロックを評価します。
...クトリ path の "." と ".." をのぞく各エントリを表す文字列を引数として、
ブロックを評価します。
ブロックが与えられなかった場合、各エントリを文字列として保持する
Enumerator オブジェクトを返します。
@param path ディ......定します。
@param encoding ディレクトリのエンコーディングを文字列か
Encoding オブジェクトで指定します。省略した場合は
ファイルシステムのエンコーディングと同じになります。
@raise Errno::EXXX 失......敗した場合に発生します。
//emlist[例][ruby]{
Dir.each_child('.'){|f|
p f
}
#=> "bar"
# "foo"
//}
@see Dir.foreach
@see Dir.children......敗した場合に発生します。
//emlist[例][ruby]{
Dir.each_child('.'){|f|
p f
}
#=> "bar"
# "foo"
//}
@see Dir.foreach
@see Dir.children
@see Dir#each_child... -
Dir
. each _ child(path , encoding: enc) {|file| . . . } -> nil (12403.0) -
ディレクトリ path の "." と ".." をのぞく各エントリを表す文字列を引数として、 ブロックを評価します。
...クトリ path の "." と ".." をのぞく各エントリを表す文字列を引数として、
ブロックを評価します。
ブロックが与えられなかった場合、各エントリを文字列として保持する
Enumerator オブジェクトを返します。
@param path ディ......定します。
@param encoding ディレクトリのエンコーディングを文字列か
Encoding オブジェクトで指定します。省略した場合は
ファイルシステムのエンコーディングと同じになります。
@raise Errno::EXXX 失......敗した場合に発生します。
//emlist[例][ruby]{
Dir.each_child('.'){|f|
p f
}
#=> "bar"
# "foo"
//}
@see Dir.foreach
@see Dir.children......敗した場合に発生します。
//emlist[例][ruby]{
Dir.each_child('.'){|f|
p f
}
#=> "bar"
# "foo"
//}
@see Dir.foreach
@see Dir.children
@see Dir#each_child... -
TracePoint
. trace(*events) {|obj| . . . } -> TracePoint (12309.0) -
新しい TracePoint オブジェクトを作成して自動的にトレースを開始し ます。TracePoint.new のコンビニエンスメソッドです。
...新しい TracePoint オブジェクトを作成して自動的にトレースを開始し
ます。TracePoint.new のコンビニエンスメソッドです。
@param events トレースするイベントを String か Symbol で任
意の数指定します。指定できる値に......ついては
TracePoint.new を参照してください。
//emlist[例][ruby]{
trace = TracePoint.trace(:call) { |tp| [tp.lineno, tp.event] }
# => #<TracePoint:0x007f786a452448>
trace.enabled? # => true
//}
@raise ThreadError ブロックを指定しなかった場合に発生し... -
File
. atime(filename) -> Time (12303.0) -
最終アクセス時刻を返します。
...クセス時刻を返します。
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例][ruby]{
File.atime(__FILE__) # => 2017-11-28 22:38:44 +0900
//...