クラス
-
ARGF
. class (101) - Array (555)
- BasicObject (33)
- Binding (11)
- Complex (66)
- Data (2)
- Dir (118)
-
Encoding
:: Converter (22) - Enumerator (55)
-
Enumerator
:: Lazy (162) - Exception (95)
- Fiber (29)
- File (123)
-
File
:: Stat (11) - Float (19)
- FrozenError (5)
- Hash (62)
- IO (898)
- Integer (147)
- KeyError (14)
- MatchData (92)
- Module (276)
- Mutex (8)
- Numeric (84)
- Object (165)
- Proc (44)
- Random (44)
- Range (216)
- Rational (77)
- Regexp (11)
- String (311)
- Struct (33)
- SystemCallError (11)
- SystemExit (11)
- Thread (98)
-
Thread
:: Mutex (36) - ThreadGroup (11)
- TracePoint (95)
- UnboundMethod (11)
モジュール
- Comparable (65)
- Enumerable (143)
キーワード
- & (11)
- * (33)
- ** (11)
- + (11)
- - (11)
-
/ (11) - < (22)
- << (11)
- <= (22)
- == (22)
- === (22)
- =~ (22)
- > (22)
- >= (22)
- [] (180)
- []= (121)
- add (11)
- advise (11)
- at (11)
- atime (11)
- backtrace (11)
-
backtrace
_ locations (11) - begin (22)
- between? (11)
- bind (11)
- binmode (11)
- birthtime (21)
- bsearch (44)
- byteindex (2)
- byteoffset (4)
- bytes (14)
- bytesplice (4)
- call (11)
-
callee
_ id (11) - cause (11)
- ceil (11)
- chars (14)
- children (6)
- chmod (11)
- chown (11)
- chr (22)
- chunk (11)
-
chunk
_ while (8) - clamp (10)
-
class
_ variable _ get (11) - clone (22)
- close (15)
-
close
_ read (11) -
close
_ write (11) - coerce (11)
- collect (11)
-
collect
_ concat (11) - combination (22)
-
const
_ get (11) -
const
_ missing (11) - convert (11)
- ctime (11)
- cycle (22)
-
define
_ method (22) -
delete
_ at (11) -
deprecate
_ constant (9) - detect (22)
- digits (22)
- drop (11)
- dup (22)
- each (110)
-
each
_ byte (22) -
each
_ char (22) -
each
_ child (12) -
each
_ line (66) - end (22)
- entries (6)
-
enum
_ for (44) - eof (22)
- eof? (22)
- errno (11)
-
eval
_ script (6) - event (11)
- exception (22)
- fcntl (11)
- fdatasync (11)
- feed (11)
- fetch (73)
-
fetch
_ values (18) - fileno (32)
- filter (6)
-
filter
_ map (5) - find (22)
-
find
_ all (11) - finish (11)
- first (44)
-
flat
_ map (11) - flatten (11)
- flatten! (11)
- flock (11)
- floor (11)
- flush (11)
- fsync (11)
- gcd (11)
- gcdlcm (11)
- getc (11)
- gets (33)
- include (11)
-
initialize
_ copy (11) - insert (11)
- inspect (22)
-
instance
_ eval (22) -
instance
_ method (11) -
instruction
_ sequence (6) - intersection (5)
- ioctl (11)
- isatty (11)
- join (33)
- key (7)
- last (44)
- lcm (11)
- lineno (22)
- lineno= (11)
- lines (42)
-
local
_ variable _ get (11) - lock (11)
- lstat (11)
- map (11)
-
marshal
_ load (11) - max (86)
- method (11)
-
method
_ id (11) -
method
_ missing (11) - min (86)
- mtime (11)
- name= (9)
- next (11)
-
next
_ values (11) - offset (22)
- ord (11)
- parameters (6)
- path (18)
- peek (11)
-
peek
_ values (11) - permutation (22)
- pid (11)
- pop (22)
- pos (22)
- pos= (22)
- pow (22)
- pread (7)
- print (11)
- printf (11)
- private (23)
-
private
_ constant (11) - protected (23)
- public (23)
-
public
_ constant (11) -
public
_ instance _ method (11) -
public
_ method (11) -
public
_ send (22) - putc (11)
- puts (11)
- pwrite (7)
- quo (11)
-
raised
_ exception (11) - rand (33)
- rationalize (22)
- read (22)
-
read
_ nonblock (11) - readbyte (22)
- readchar (22)
- readline (66)
- readlines (33)
- readpartial (11)
- receiver (12)
- rehash (11)
- reject (11)
-
remove
_ class _ variable (11) -
remove
_ const (11) -
remove
_ instance _ variable (11) -
remove
_ method (11) - reopen (33)
-
repeated
_ combination (22) -
repeated
_ permutation (22) - replace (11)
-
report
_ on _ exception (8) -
report
_ on _ exception= (8) -
respond
_ to? (11) - resume (11)
-
return
_ value (11) - rewind (22)
- rotate (11)
- rotate! (11)
- round (30)
- run (11)
- sample (44)
- seek (22)
- select (11)
-
set
_ backtrace (11) - setbyte (11)
- shift (22)
-
singleton
_ class (11) -
singleton
_ method (11) - size (11)
- sleep (11)
- slice (66)
- stat (11)
- status (22)
- step (94)
- sync (11)
- sync= (11)
- synchronize (11)
- sysread (11)
- sysseek (11)
- syswrite (11)
- take (11)
- tell (22)
-
to
_ a (6) -
to
_ enum (44) -
to
_ f (11) -
to
_ i (44) -
to
_ path (7) -
to
_ r (11) -
to
_ s (11) - transfer (3)
- truncate (22)
- tty? (11)
-
undef
_ method (11) - ungetc (11)
-
unicode
_ normalize (10) -
unicode
_ normalize! (10) -
unicode
_ normalized? (10) - unlock (11)
-
values
_ at (11) - wakeup (11)
- with (2)
- write (11)
-
write
_ nonblock (11) - yield (11)
- zip (22)
- | (11)
検索結果
先頭5件
-
Thread
# raise(error _ type , message , traceback) -> () (18128.0) -
自身が表すスレッドで強制的に例外を発生させます。
...させます。
@param error_type Kernel.#raise を参照してください。
@param message Kernel.#raise を参照してください。
@param traceback Kernel.#raise を参照してください。
Thread.new {
sleep 1
Thread.main.raise "foobar"
}
begin
sleep
rescue
p... -
Fiber
# raise -> object (18118.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...ew { Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
Fiber
# raise(exception , message = nil , backtrace = nil) -> object (18118.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...ew { Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
Fiber
# raise(message) -> object (18118.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...ew { Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
TracePoint
# raised _ exception -> Exception (6121.0) -
発生した例外を返します。
...発生した例外を返します。
@raise RuntimeError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。
//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided... -
IO
# advise(advice , offset=0 , len=0) -> nil (33.0) -
posix_fadvise(2) を呼びだし、 ファイルへのアクセスパターンをOSに知らせます。
...を指定するデータの長さ
@raise IOError ストリームが既に閉じられているときに発生する例外
@raise Errno::EBADF ファイルデスクリプタが不正であるときに発生する例外
@raise Errno::EINVAL advice が不正
@raise Errno::ESPIPE ファイルデスク......リプタが FIFO か pipe を指している
場合に発生する例外(Linux はこの場合には Errno::EINVAL を発生する)
@raise RangeError offset,lenが有効範囲から出ている場合に発生する例外
//emlist[例][ruby]{
File.open("testfile") { |f| p f.advise(:sequentia... -
Array
# []=(start , length , val) (30.0) -
インデックス start から length 個の要素を配列 val の内容で置き換えます。 start が自身の末尾を越える時には配列の長さを自動的に拡張し、拡張した領域を nil で初期化します。
...= [0, 1, 2, 3, 4, 5]
a[2, 3] = []
p a # => [0, 1, 5]
//}
@raise TypeError 引数 start、length に整数以外の(暗黙の型変換が行えな
い)オブジェクトを指定した場合に発生します。
@raise TypeError 引数 val に配列以外の(暗黙の型変換......が行えない)オブジェ
クトを指定した場合に発生します。
@raise IndexError 引数 start が自身の始点よりも前を指している場合に発生します。
@raise IndexError 引数 length に負の数を指定した場合に発生します。... -
BasicObject
# instance _ eval {|obj| . . . } -> object (21.0) -
オブジェクトのコンテキストで文字列 expr またはオブジェクト自身をブロックパラメータとするブロックを 評価してその結果を返します。
...XX"
some.instance_eval{do_fuga } #=> "secret" # private メソッドも呼び出せる
some.instance_eval 'raise' # ..:10: (eval):1: (RuntimeError)
messg = 'unknown'
some.instance_eval 'raise messg','file.rb',999 # file.rb:999: unknown (RuntimeError)
//}
//emlist[例][ruby]{
class Bar < BasicObje......ct
def call1
instance_eval("::ENV.class")
end
def call2
instance_eval("ENV.class")
end
end
bar = Bar.new
bar.call1 # => Object
bar.call2 # raise NameError
//}
@see Module#module_eval, Kernel.#eval, BasicObject#instance_exec... -
BasicObject
# instance _ eval(expr , filename = "(eval)" , lineno = 1) -> object (21.0) -
オブジェクトのコンテキストで文字列 expr またはオブジェクト自身をブロックパラメータとするブロックを 評価してその結果を返します。
...XX"
some.instance_eval{do_fuga } #=> "secret" # private メソッドも呼び出せる
some.instance_eval 'raise' # ..:10: (eval):1: (RuntimeError)
messg = 'unknown'
some.instance_eval 'raise messg','file.rb',999 # file.rb:999: unknown (RuntimeError)
//}
//emlist[例][ruby]{
class Bar < BasicObje......ct
def call1
instance_eval("::ENV.class")
end
def call2
instance_eval("ENV.class")
end
end
bar = Bar.new
bar.call1 # => Object
bar.call2 # raise NameError
//}
@see Module#module_eval, Kernel.#eval, BasicObject#instance_exec... -
File
# birthtime -> Time (21.0) -
作成された時刻を Time オブジェクトとして返します。
...た時刻を Time オブジェクトとして返します。
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
@raise NotImplementedError Windows のような birthtime のない... -
IO
# pread(maxlen , offset , outbuf = "") -> string (21.0) -
preadシステムコールを使ってファイルポインタを変更せずに、また現在のファイルポインタに 依存せずにmaxlenバイト読み込みます。
...@param outbuf データを受け取る String を指定します。
@raise Errno::EXXX シークまたは書き込みが失敗した場合に発生します。
@raise EOFError EOF に到達した時に発生します。
@raise NotImplementedError システムコールがサポートされていな... -
IO
# read(length = nil , outbuf = "") -> String | nil (21.0) -
length バイト読み込んで、その文字列を返します。
...み込んだデータのサイズになります。
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
@raise Errno::EXXX データの読み込みに失敗した場合に発生します。
@raise ArgumentError length が負の場合に発生します...