別のキーワード
ライブラリ
クラス
-
ARGF
. class (24) - Array (416)
- BasicObject (36)
- Binding (12)
- Complex (60)
- Data (3)
- Dir (130)
-
Encoding
:: Converter (24) - Enumerator (12)
-
Enumerator
:: Lazy (97) - Exception (104)
- Fiber (42)
- File (124)
-
File
:: Stat (12) - Float (45)
- FrozenError (6)
-
Gem
:: Installer (12) - IO (556)
-
IRB
:: ExtendCommand :: Load (12) - Integer (174)
- MatchData (106)
- Matrix (162)
- Module (276)
- Monitor (18)
- Mutex (4)
-
Net
:: HTTPResponse (12) - Numeric (93)
- Object (156)
-
OpenSSL
:: BN (96) - OptionParser (348)
- Pathname (36)
- Prime (12)
- Proc (12)
-
Rake
:: InvocationChain (12) - Random (24)
- Range (157)
- Rational (97)
- Regexp (12)
- Set (60)
- String (336)
- StringIO (304)
- StringScanner (60)
- Thread (36)
-
Thread
:: Mutex (20) - TracePoint (105)
- UnboundMethod (12)
- Vector (43)
- WIN32OLE (36)
-
WIN32OLE
_ TYPELIB (12)
モジュール
- Comparable (18)
- Enumerable (120)
- Kernel (12)
-
Net
:: HTTPHeader (72) -
OptionParser
:: Arguable (60) -
Rake
:: TaskManager (12) - TSort (12)
キーワード
- * (48)
- ** (13)
-
/ (12) - < (12)
- <= (12)
- == (24)
- === (12)
- =~ (24)
- > (12)
- >= (12)
- [] (174)
- []= (91)
- accept (12)
- adjugate (12)
- advise (12)
-
angle
_ with (12) - antisymmetric? (7)
- append (12)
- at (12)
- atime (12)
- backtrace (12)
-
backtrace
_ locations (12) - begin (24)
- between? (12)
- bind (12)
- binmode (12)
- birthtime (12)
- bsearch (48)
- bytebegin (2)
- byteend (2)
- byteindex (3)
- byteoffset (6)
- bytes (14)
-
callee
_ id (12) - cause (12)
- ceil (12)
- children (19)
- chmod (12)
- chown (12)
- chr (24)
- clamp (6)
-
class
_ variable _ get (12) -
clear
_ bit! (12) - clone (24)
- close (14)
-
close
_ read (12) -
close
_ write (12) - coerce (12)
-
cofactor
_ expansion (12) - collect (12)
-
collect
_ concat (12) - combination (24)
-
const
_ get (12) -
const
_ missing (12) -
content
_ length (12) - convert (12)
- ctime (12)
- cycle (24)
-
define
_ method (24) -
delete
_ at (12) - det (12)
- detect (24)
- determinant (12)
- difference (12)
- digits (24)
- disjoint? (12)
- dup (12)
- each (132)
-
each
_ byte (48) -
each
_ child (14) -
each
_ line (96) - eigen (12)
- eigensystem (12)
- end (12)
- entries (19)
-
entrywise
_ product (8) -
enum
_ for (24) - environment (12)
-
eval
_ script (7) - event (12)
- exception (24)
- execute (12)
- exit (12)
- fcntl (12)
- fdatasync (12)
- feed (12)
- fetch (56)
-
fetch
_ values (2) - fileno (23)
- filter (7)
-
filter
_ map (6) - find (24)
-
find
_ all (12) - finish (12)
- first (48)
-
flat
_ map (12) - flatten (12)
- flatten! (24)
- flock (12)
- floor (12)
- flush (12)
- gcd (12)
- gcdlcm (12)
- gem (12)
- getbyte (12)
- getc (12)
- getopts (36)
- gets (12)
-
hadamard
_ product (8) - hstack (12)
- include (12)
-
initialize
_ copy (12) - insert (12)
- inspect (24)
- install (12)
-
instance
_ eval (24) -
instance
_ method (12) -
instruction
_ sequence (7) - intersection (18)
- isatty (12)
- join (12)
-
laplace
_ expansion (12) - last (12)
- lcm (12)
- lineno (12)
- lines (14)
-
local
_ variable _ get (12) - lshift! (12)
- lstat (12)
- map (12)
-
mask
_ bits! (12) - max (48)
-
method
_ id (12) -
method
_ missing (12) - min (94)
-
mod
_ inverse (12) -
mon
_ exit (6) - mtime (12)
- name= (10)
- normalize (12)
- offset (24)
-
ole
_ query _ interface (12) - on (144)
- ord (12)
- order (48)
- order! (48)
- parameters (7)
- parse (24)
- parse! (24)
- path (32)
- peek (12)
- peep (12)
- permutation (24)
- permute (24)
- permute! (24)
- pid (12)
- pointer= (12)
- pop (12)
- pos (24)
- pos= (48)
- pow (24)
- pread (8)
-
prime
_ division (24) -
prime
_ fasttest? (12) - print (36)
- printf (12)
- private (48)
-
private
_ constant (12) - public (48)
-
public
_ constant (12) -
public
_ instance _ method (12) -
public
_ method (12) -
public
_ send (24) - putc (12)
- puts (12)
- pwrite (8)
- quo (12)
-
raised
_ exception (12) - rand (24)
- range (12)
-
range
_ length (12) - rationalize (24)
- read (12)
- readbyte (36)
- readchar (24)
- readline (12)
- readlines (48)
- receiver (6)
- regular? (12)
- reject (24)
-
relative
_ path _ from (12) -
remove
_ class _ variable (12) -
remove
_ instance _ variable (12) - reopen (60)
-
repeated
_ combination (24) -
repeated
_ permutation (24) -
report
_ on _ exception (9) -
report
_ on _ exception= (9) -
respond
_ to? (12) - resume (12)
-
return
_ value (12) - rewind (12)
- round (33)
- rshift! (12)
- sample (24)
- seek (12)
- select (12)
-
set
_ backtrace (12) -
set
_ bit! (12) - setbyte (12)
- setproperty (24)
- shift (24)
-
singleton
_ class (12) -
singleton
_ method (12) - size (13)
-
skew
_ symmetric? (7) - sleep (12)
- slice (72)
- stat (12)
- step (93)
- sync (12)
- synchronize (12)
-
synthesize
_ file _ task (12) - syswrite (12)
- tell (24)
-
to
_ a (7) -
to
_ d (36) -
to
_ enum (24) -
to
_ i (36) -
to
_ path (8) -
to
_ r (12) -
to
_ s (24) - tr (12)
- trace (12)
- transfer (12)
- truncate (36)
-
tsort
_ each (12) - tty? (12)
- ungetc (12)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - union (12)
- unscan (12)
- value (12)
- with (3)
- write (24)
- yield (12)
- zip (24)
検索結果
先頭5件
-
Fiber
# raise -> object (24240.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
Fiber.yield が呼ばれていないかファイバーがすでに終了している場合、
FiberError が発生します。
引数を渡さない場合、RuntimeError が発生します。
message......引数を渡した場合、message 引数をメッセージとした RuntimeError
が発生します。
その他のケースでは、最初の引数は Exception か Exception
のインスタンスを返す exception メソッドを持ったオブジェクトである
必要があります。
こ......す。
@param exception 発生させる例外です。
@param backtrace 例外発生時のスタックトレースです。文字列の配列で指定します。
//emlist[例][ruby]{
f = Fiber.new { Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内... -
Fiber
# raise(exception , message = nil , backtrace = nil) -> object (24240.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
Fiber.yield が呼ばれていないかファイバーがすでに終了している場合、
FiberError が発生します。
引数を渡さない場合、RuntimeError が発生します。
message......引数を渡した場合、message 引数をメッセージとした RuntimeError
が発生します。
その他のケースでは、最初の引数は Exception か Exception
のインスタンスを返す exception メソッドを持ったオブジェクトである
必要があります。
こ......す。
@param exception 発生させる例外です。
@param backtrace 例外発生時のスタックトレースです。文字列の配列で指定します。
//emlist[例][ruby]{
f = Fiber.new { Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内... -
Fiber
# raise(message) -> object (24240.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
Fiber.yield が呼ばれていないかファイバーがすでに終了している場合、
FiberError が発生します。
引数を渡さない場合、RuntimeError が発生します。
message......引数を渡した場合、message 引数をメッセージとした RuntimeError
が発生します。
その他のケースでは、最初の引数は Exception か Exception
のインスタンスを返す exception メソッドを持ったオブジェクトである
必要があります。
こ......す。
@param exception 発生させる例外です。
@param backtrace 例外発生時のスタックトレースです。文字列の配列で指定します。
//emlist[例][ruby]{
f = Fiber.new { Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内... -
TracePoint
# raised _ exception -> Exception (12231.0) -
発生した例外を返します。
...。
@raise RuntimeError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。
//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
begin
0/... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (9419.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...script_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval......("puts 'hello'")
end
//}
@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。... -
WIN32OLE
# ole _ query _ interface(iid) -> WIN32OLE (9231.0) -
IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを 持つオブジェクトを取得します。
...
IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを
持つオブジェクトを取得します。
オブジェクトが複数のオートメーション用インターフェイスを持つ場合に、当
メソッドを利用して既定のイ......m iid 取得するインターフェイスのIIDを文字列で指定します。
@return iidパラメータで指定したインターフェイスを持つWIN32OLEオブジェクト
@raise WIN32OLERuntimeError 指定したIIDをオブジェクトが持たない場合に通知されます。
ie......= WIN32OLE.new('InternetExplorer.Application')
ie_web_app = ie.ole_query_interface('{0002DF05-0000-0000-C000-000000000046}')
上例のie_web_appは、ieと同じインスタンスとなります。
COMの仕様では1つのインターフェイスについて同じIID問い合わせに対し... -
Exception
# exception(error _ message) -> Exception (9225.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_message エラーメッセージを表す文字列を指定します。
//emlist[例][ruby]{
begin
# .........# 何か処理
rescue => e
raise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end
//}... -
StringIO
# readline(rs = $ / ) -> String (9225.0) -
自身から 1 行読み込んで、その文字列を返します。
...終端に到達した時には、例外 EOFError を発生させます。
IO#readline と違い読み込んだ文字列を変数 $_ にセットしません。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。空文字列......ラフモード)。
@raise EOFError 文字列の終端に到達した時に発生します。
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("hoge\nfoo\nbar\n")
a.readline......#=> "hoge\n"
a.readline(nil) #=> "foo\nbar\n"
a.readline #=> EOFError が発生する
//}
@see $/... -
Encoding
:: Converter # finish -> String (9219.0) -
変換処理を終了し、結果文字列の末尾を返します。 変換元の文字列の末尾がバイト列の途中で終わっていた場合、保持しているバイト列全てを返します。
...末尾
@raise Encoding::InvalidByteSequenceError 変換元のエンコーディングにお
いて不正なバイト列があった場合に発生します。
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "iso-2022-jp")
p ec.convert("\u3042") #=> "\e$B$\""
p ec.finish... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (9219.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...ception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if D......ay == 31
raise "#{month} is not long month"
end
def get_exception
return begin
yield
rescue => e
e
end
end
e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:in `get_exception'", "......test.rb:15:in `<main>'"]
//}
@see Exception#backtrace... -
Integer
# inspect(base=10) -> String (9219.0) -
整数を 10 進文字列表現に変換します。
...文字列表
現に変換します。
//emlist[][ruby]{
p 10.to_s(2) # => "1010"
p 10.to_s(8) # => "12"
p 10.to_s(16) # => "a"
p 35.to_s(36) # => "z"
//}
@return 数値の文字列表現
@param base 基数となる 2 - 36 の数値。
@raise ArgumentError base に 2 - 36 以外の数...