1344件ヒット
[1-100件を表示]
(0.138秒)
種類
- インスタンスメソッド (1025)
- モジュール関数 (165)
- 特異メソッド (88)
- クラス (66)
クラス
- Array (77)
-
Encoding
:: Converter (44) -
Encoding
:: InvalidByteSequenceError (22) -
Encoding
:: UndefinedConversionError (11) - Enumerator (11)
-
Enumerator
:: ArithmeticSequence (24) - Exception (117)
- File (33)
-
File
:: Stat (11) - FrozenError (5)
- IO (11)
- Integer (21)
- KeyError (14)
- LoadError (11)
- LocalJumpError (22)
- MatchData (44)
- Module (11)
- Mutex (2)
- NameError (40)
- NoMethodError (11)
- Object (11)
- Random (33)
- Range (83)
- Regexp (44)
- SignalException (22)
- StopIteration (11)
- String (132)
- SystemCallError (22)
- SystemExit (22)
- Thread (66)
-
Thread
:: Mutex (9) -
Thread
:: Queue (27) -
Thread
:: SizedQueue (27) - TracePoint (22)
- UncaughtThrowError (30)
モジュール
- Comparable (10)
- Kernel (132)
- Process (11)
- Signal (22)
キーワード
-
/ (10) - == (17)
- === (11)
- =~ (11)
- Fiber (11)
- Interrupt (11)
- Mutex (11)
- Status (11)
- Thread (11)
- UndefinedConversionError (11)
- [] (110)
- abort (22)
- args (11)
- at (11)
- backtrace (11)
-
backtrace
_ locations (11) - cause (11)
- clamp (10)
- cover? (17)
- delete (11)
- deq (18)
- div (11)
- end (28)
- errno (11)
-
error
_ bytes (11) -
error
_ char (11) - exception (22)
- exit (22)
- exit! (11)
-
exit
_ value (11) - fail (33)
- fetch (33)
- first (22)
-
fixed
_ encoding? (11) -
handle
_ interrupt (11) - hash (6)
-
incomplete
_ input? (11) -
initialize
_ copy (11) - inspect (11)
- key (7)
- kill (11)
- last (22)
-
last
_ match (22) -
local
_ variables (9) - name (11)
- new (11)
- next (11)
- offset (22)
- path (11)
- pop (18)
-
primitive
_ convert (44) -
public
_ constant (11) - raise (44)
-
raised
_ exception (11) - rand (33)
- readbyte (11)
- reason (11)
- receiver (21)
- rename (11)
- require (11)
- result (11)
-
set
_ backtrace (11) - setpriority (11)
- shift (18)
- signm (11)
- signo (11)
- slice (66)
- status (11)
- sticky? (11)
- success? (11)
- tag (10)
- terminate (11)
- throw (11)
-
to
_ s (32) - trap (22)
- unlink (11)
- unlock (11)
- value (10)
検索結果
先頭5件
-
Enumerator
:: ArithmeticSequence # begin -> Numeric (35203.0) -
初項 (始端) を返します。
...初項 (始端) を返します。
@see Enumerator::ArithmeticSequence#end... -
Enumerator
:: ArithmeticSequence # begin -> Numeric | nil (35203.0) -
初項 (始端) を返します。
...初項 (始端) を返します。
@see Enumerator::ArithmeticSequence#end... -
MatchData
# begin(n) -> Integer | nil (32339.0) -
n 番目の部分文字列先頭のオフセットを返します。
...ise IndexError 範囲外の n を指定した場合に発生します。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.begin(0) # => 0
p $~.begin(1) # => 0
p $~.begin(2) # => 3
p $~.begin(3) # => nil
p $~.begin(4) # => `begin': index 4 out of matches (IndexError)
//}
@see M......atchData#end... -
Range
# begin -> object (32237.0) -
始端の要素を返します。 始端を持たない範囲オブジェクトの場合、begin はnilを返しますが, first は例外 RangeError が発生します。
...、begin はnilを返しますが, first は例外 RangeError が発生します。
//emlist[例][ruby]{
# 始端を持つ場合
p (1..5).begin # => 1
p (1..0).begin # => 1
p (1..5).first # => 1
p (1..0).first # => 1
# 始端を持たない場合
p (..5).begin #=> nil
p (..5).first #=> RangeError......//}
@see Range#end... -
Enumerator
:: ArithmeticSequence # end -> Numeric | nil (20108.0) -
末項(終端)を返します。
...末項(終端)を返します。
@see Enumerator::ArithmeticSequence#begin... -
Exception
# exception(error _ message) -> Exception (17220.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...合は self を返します。引数を指定した場合 自身のコピー
を生成し 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
//}... -
KeyError
# key -> object (17126.0) -
KeyError の原因となったメソッド呼び出しのキーを返します。
...KeyError の原因となったメソッド呼び出しのキーを返します。
@raise ArgumentError キーが設定されていない時に発生します。
例:
h = Hash.new
begin
h.fetch('gumby'*20)
rescue KeyError => e
p e.message # => "key not found: \"gumbygumby......gumbygumbygumbygumbygumbygumbygumbygumbygumbygumbyg..."
p 'gumby'*20 == e.key # => true
end... -
Exception
# exception -> self (17120.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...合は self を返します。引数を指定した場合 自身のコピー
を生成し 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
//}... -
Encoding
:: InvalidByteSequenceError # incomplete _ input? -> bool (17114.0) -
エラー発生時に入力文字列が不足している場合に真を返します。
...//emlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1z")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "z" on EUC-JP>
p $!.incomplete_input? #=> false
end
begin
ec.convert("ab......c\xA1")
ec.finish
rescue Encoding::InvalidByteSequenceError
p $! #=> #<Encoding::InvalidByteSequenceError: incomplete "\xA1" on EUC-JP>
p $!.incomplete_input? #=> true
end
//}... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (17108.0) -
エラー発生時に捨てられたバイト列を返します。
.../emlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1\xFFdef")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "\xFF" on EUC-JP>
puts $!.error_bytes.dump #=> "\xA1"
puts $!.rea......dagain_bytes.dump #=> "\xFF"
end
//}
@see Encoding::InvalidByteSequenceError#readagain_bytes... -
TracePoint
# raised _ exception -> Exception (17108.0) -
発生した例外を返します。
...e RuntimeError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。
//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
begin
0/0
rescue
e... -
KeyError
# receiver -> object (14226.0) -
KeyError の原因となったメソッド呼び出しのレシーバを返します。
...KeyError の原因となったメソッド呼び出しのレシーバを返します。
@raise ArgumentError レシーバが設定されていない時に発生します。
例:
h = Hash.new
begin
h.fetch('gumby'*20)
rescue KeyError => e
p e.message # => "key not found:......\"gumbygumbygumbygumbygumbygumbygumbygumbygumbygumbygumbygumbyg..."
p h.equal?(e.receiver) # => true
end...