1025件ヒット
[201-300件を表示]
(0.323秒)
ライブラリ
- ビルトイン (1025)
クラス
- Array (77)
-
Encoding
:: Converter (44) -
Encoding
:: InvalidByteSequenceError (22) -
Encoding
:: UndefinedConversionError (11) - Enumerator (11)
-
Enumerator
:: ArithmeticSequence (24) - Exception (117)
-
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 (22)
- SignalException (22)
- StopIteration (11)
- String (132)
- SystemCallError (11)
- SystemExit (22)
- Thread (55)
-
Thread
:: Mutex (9) -
Thread
:: Queue (27) -
Thread
:: SizedQueue (27) - TracePoint (11)
- UncaughtThrowError (30)
モジュール
- Comparable (10)
キーワード
-
/ (10) - == (17)
- =~ (11)
- [] (110)
- args (11)
- at (11)
- backtrace (11)
-
backtrace
_ locations (11) - cause (11)
- clamp (10)
- cover? (17)
- deq (18)
- div (11)
- end (28)
- errno (11)
-
error
_ bytes (11) -
error
_ char (11) - exception (22)
- exit (11)
-
exit
_ value (11) - fetch (33)
- first (22)
-
fixed
_ encoding? (11) - hash (6)
-
incomplete
_ input? (11) -
initialize
_ copy (11) - inspect (11)
- key (7)
- kill (11)
- last (22)
-
local
_ variables (9) - name (11)
- next (11)
- offset (22)
- path (11)
- pop (18)
-
primitive
_ convert (44) -
public
_ constant (11) - raise (11)
-
raised
_ exception (11) - rand (33)
- readbyte (11)
- reason (11)
- receiver (21)
- result (11)
-
set
_ backtrace (11) - shift (18)
- signm (11)
- signo (11)
- slice (66)
- status (11)
- sticky? (11)
- success? (11)
- tag (10)
- terminate (11)
-
to
_ s (32) - unlock (11)
- value (10)
検索結果
先頭5件
-
Range
# cover?(obj) -> bool (8013.0) -
obj が範囲内に含まれている時に true を返します。
...数値については、例外として Range#include? も連続的に扱います。)
Range#exclude_end?がfalseなら「begin <= obj <= end」を、
trueなら「begin <= obj < end」を意味します。
@param obj 比較対象のオブジェクトを指定します。
//emlist[数値は連... -
Regexp
# fixed _ encoding? -> bool (8013.0) -
正規表現が任意の ASCII 互換エンコーディングとマッチ可能な時に false を返します。
...# => true
r.encoding # => #<Encoding:UTF-8>
r =~ "\u{6666} a" # => 2
begin
r =~ "\xa1\xa2".force_encoding("euc-jp")
rescue => e
e.class # => Encoding::CompatibilityError
end
r =~......# => true
r.encoding # => #<Encoding:UTF-8>
r =~ "\u{6666} a" # => 0
begin
r =~ "\xa1\xa2".force_encoding("euc-jp")
rescue => e
e.class # => Encoding::CompatibilityError
end
r =~... -
SystemCallError
# errno -> Integer | nil (8013.0) -
レシーバに対応するシステム依存のエラーコードを返します。
...ドを渡さない形式で生成した場合は nil を返します。
begin
raise Errno::ENOENT
rescue Errno::ENOENT => err
p err.errno # => 2
p Errno::ENOENT::Errno # => 2
end
begin
raise SystemCallError, 'message'
rescue SystemCallError => err... -
SystemExit
# status -> Integer (8013.0) -
例外オブジェクトに保存された終了ステータスを返します。
...します。
終了ステータスは Kernel.#exit や SystemExit.new などで設定されます。
例:
begin
exit 1
rescue SystemExit => err
p err.status # => 1
end
begin
raise SystemExit.new(1, "dummy exit")
rescue SystemExit => err
p err.status # => 1
end... -
SystemExit
# success? -> bool (8013.0) -
終了ステータスが正常終了を示す値ならば true を返します。
...値ならば true を返します。
大半のシステムでは、ステータス 0 が正常終了を表します。
例:
begin
exit true
rescue SystemExit => err
p err.success? # => true
end
begin
exit false
rescue SystemExit => err
p err.success? # => false
end... -
Array
# fetch(nth) -> object (8007.0) -
nth 番目の要素を返します。
...ておらず、 nth 番目の要
素も存在しなかった場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5]
begin
p a.fetch(10)
rescue IndexError => err
puts err #=> index 10 out of array
end
p a.fetch(10, 999) #=> 999
result = a.fetch(10){|nth|
print... -
Array
# fetch(nth) {|nth| . . . } -> object (8007.0) -
nth 番目の要素を返します。
...ておらず、 nth 番目の要
素も存在しなかった場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5]
begin
p a.fetch(10)
rescue IndexError => err
puts err #=> index 10 out of array
end
p a.fetch(10, 999) #=> 999
result = a.fetch(10){|nth|
print... -
Array
# fetch(nth , ifnone) -> object (8007.0) -
nth 番目の要素を返します。
...ておらず、 nth 番目の要
素も存在しなかった場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5]
begin
p a.fetch(10)
rescue IndexError => err
puts err #=> index 10 out of array
end
p a.fetch(10, 999) #=> 999
result = a.fetch(10){|nth|
print... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol (8007.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence
ec.insert_output(ec... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (8007.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence
ec.insert_output(ec...