るりまサーチ

最速Rubyリファレンスマニュアル検索!
230件ヒット [1-100件を表示] (0.126秒)

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

キーワード

検索結果

<< 1 2 3 > >>

MatchData#begin(n) -> Integer | nil (24250.0)

n 番目の部分文字列先頭のオフセットを返します。

...ram n 部分文字列を指定する数値。

@raise 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 MatchData#end...

Array#at(nth) -> object | nil (18123.0)

nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。

...nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。

@param nth インデックスを整数で指定します。
先頭の要素が 0 番目になります。nth の値が負の時には末尾から
のインデックス...
...ドによる
暗黙の型変換を試みます。

@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
a = [ "a", "b", "c", "d", "e" ]
a[0] #=> "a"
a[1] #=> "b"
a...

Exception#backtrace_locations -> [Thread::Backtrace::Location] (12419.0)

バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。

...#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。

現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。

//emlist[例: test.rb][ruby]{
r
equire "date"
def check_long_month(month)
r
eturn if Date.new...
...1
r
aise "#{month} is not long month"
end

def get_exception
r
eturn begin
yield
r
escue => 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...

MatchData#bytebegin(n) -> Integer | nil (12261.0)

n 番目の部分文字列先頭のバイトオフセットを返します。

...フセットを返します。

@param n 部分文字列を指定する数値。
@param name 名前付きキャプチャを指定する文字列またはシンボル。

@raise IndexError 範囲外の n を指定した場合に発生します。
@raise IndexError 正規表現中で定義されてい...
...st[例][ruby]{
/(c).*(いう).*(e.*)/ =~ 'abcあいうdef'
p $~ # => #<MatchData "cあいうdef" 1:"c" 2:"いう" 3:"ef">
p $~.bytebegin(0) # => 2
p $~.bytebegin(1) # => 2
p $~.bytebegin(2) # => 6
p $~.bytebegin(3) # => 13
p $~.bytebegin(4) # => index 4 out of matches (IndexError)
//}...
...t[シンボルを指定する例][ruby]{
/(?<key>\S+):\s*(?<value>\S+)/ =~ "name: ruby"
$~ # => #<MatchData "name: ruby" key:"name" value:"ruby">
$~.bytebegin(:key) # => 0
$~.bytebegin(:value) # => 6
$~.bytebegin(:foo) # => undefined group name reference: foo (IndexError)
//}...

MatchData#bytebegin(name) -> Integer | nil (12261.0)

n 番目の部分文字列先頭のバイトオフセットを返します。

...フセットを返します。

@param n 部分文字列を指定する数値。
@param name 名前付きキャプチャを指定する文字列またはシンボル。

@raise IndexError 範囲外の n を指定した場合に発生します。
@raise IndexError 正規表現中で定義されてい...
...st[例][ruby]{
/(c).*(いう).*(e.*)/ =~ 'abcあいうdef'
p $~ # => #<MatchData "cあいうdef" 1:"c" 2:"いう" 3:"ef">
p $~.bytebegin(0) # => 2
p $~.bytebegin(1) # => 2
p $~.bytebegin(2) # => 6
p $~.bytebegin(3) # => 13
p $~.bytebegin(4) # => index 4 out of matches (IndexError)
//}...
...t[シンボルを指定する例][ruby]{
/(?<key>\S+):\s*(?<value>\S+)/ =~ "name: ruby"
$~ # => #<MatchData "name: ruby" key:"name" value:"ruby">
$~.bytebegin(:key) # => 0
$~.bytebegin(:value) # => 6
$~.bytebegin(:foo) # => undefined group name reference: foo (IndexError)
//}...

絞り込み条件を変える

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize) -> Symbol (9419.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...oding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize...
...aram options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after...
...t before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize, options) -> Symbol (9419.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...oding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize...
...aram options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after...
...t before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty...

Random#rand(range) -> Integer | Float (9349.0)

一様な擬似乱数を発生させます。

...ることは出来ません。

三番目の形式では range で指定された範囲の値を返します。
r
ange の始端と終端が共に整数の場合は整数を、少なくとも片方が実数の場合は実数を返します。
r
angeが終端を含まない(つまり ... で生成し...
...れます。
r
ange.end - range.begin が整数を返す場合は range.begin + self.rand((range.end - range.begin) + e)
の値を返します(e は終端を含む場合は1、含まない場合は0です)。
r
ange.end - range.begin が実数を返す場合も同様です。
このため range が Ti...
...

@param max 乱数値の上限を正の整数または実数で指定します。
max 自体は乱数値の範囲に含まれません。
@param range 発生させる乱数値の範囲を Range オブジェクトで指定します。
r
ange.end - range.begin は数値...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset) -> Symbol (9319.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...oding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize...
...aram options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after...
...t before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty...

Random#rand -> Float (9249.0)

一様な擬似乱数を発生させます。

...ることは出来ません。

三番目の形式では range で指定された範囲の値を返します。
r
ange の始端と終端が共に整数の場合は整数を、少なくとも片方が実数の場合は実数を返します。
r
angeが終端を含まない(つまり ... で生成し...
...れます。
r
ange.end - range.begin が整数を返す場合は range.begin + self.rand((range.end - range.begin) + e)
の値を返します(e は終端を含む場合は1、含まない場合は0です)。
r
ange.end - range.begin が実数を返す場合も同様です。
このため range が Ti...
...

@param max 乱数値の上限を正の整数または実数で指定します。
max 自体は乱数値の範囲に含まれません。
@param range 発生させる乱数値の範囲を Range オブジェクトで指定します。
r
ange.end - range.begin は数値...

絞り込み条件を変える

Random#rand(max) -> Integer | Float (9249.0)

一様な擬似乱数を発生させます。

...ることは出来ません。

三番目の形式では range で指定された範囲の値を返します。
r
ange の始端と終端が共に整数の場合は整数を、少なくとも片方が実数の場合は実数を返します。
r
angeが終端を含まない(つまり ... で生成し...
...れます。
r
ange.end - range.begin が整数を返す場合は range.begin + self.rand((range.end - range.begin) + e)
の値を返します(e は終端を含む場合は1、含まない場合は0です)。
r
ange.end - range.begin が実数を返す場合も同様です。
このため range が Ti...
...

@param max 乱数値の上限を正の整数または実数で指定します。
max 自体は乱数値の範囲に含まれません。
@param range 発生させる乱数値の範囲を Range オブジェクトで指定します。
r
ange.end - range.begin は数値...
<< 1 2 3 > >>