ライブラリ
- ビルトイン (5)
- mkmf (4)
-
net
/ imap (1) - prime (8)
-
webrick
/ httpauth / authenticator (14)
クラス
-
Net
:: IMAP (1) - Object (4)
- Prime (4)
-
Prime
:: EratosthenesGenerator (3)
モジュール
キーワード
- AuthException (2)
- AuthScheme (1)
- Authenticator (1)
- EratosthenesGenerator (1)
- InfoField (1)
-
NEWS for Ruby 2
. 5 . 0 (1) -
NEWS for Ruby 2
. 6 . 0 (1) - Numeric (1)
- ProxyAuthenticator (1)
- RequestField (2)
- ResponseField (2)
- ResponseInfoField (1)
-
add
_ authenticator (1) -
check
_ signedness (2) -
convertible
_ int (2) - each (4)
- getoptlong (1)
- logger (1)
- next (1)
- realm (1)
- rewind (1)
- succ (1)
- userdb (1)
-
webrick
/ httpauth / authenticator (1) -
yield
_ self (2) - クラス/メソッドの定義 (1)
- 制御構造 (1)
- 演算子式 (1)
検索結果
先頭5件
-
Prime
:: EratosthenesGenerator (81001.0) -
Prime::PseudoPrimeGenerator の具象クラスです。 素数の生成にエラトステネスのふるいを使用しています。
Prime::PseudoPrimeGenerator の具象クラスです。
素数の生成にエラトステネスのふるいを使用しています。 -
Object
# then -> Enumerator (73243.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}
値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。
//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'
construct_url(arguments).
... -
Object
# then {|x| . . . } -> object (72643.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}
値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。
//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'
construct_url(arguments).
... -
Net
:: IMAP . add _ authenticator(auth _ type , authenticator) -> () (55801.0) -
Net::IMAP#authenticate で使う 認証用クラスを設定します。
Net::IMAP#authenticate で使う
認証用クラスを設定します。
imap ライブラリに新たな認証方式を追加するために用います。
通常は使う必要はないでしょう。もしこれを用いて
認証方式を追加する場合は net/imap.rb の
Net::IMAP::LoginAuthenticator などを参考にしてください。
@param auth_type 認証の種類(文字列)
@param authenticator 認証クラス(Class オブジェクト) -
WEBrick
:: HTTPAuth :: Authenticator (54001.0) -
-
WEBrick
:: HTTPAuth :: ProxyAuthenticator (54001.0) -
このモジュールはプロキシのためにダイジェスト認証とベーシック認証の両方 の一般的なサポートを提供します。
このモジュールはプロキシのためにダイジェスト認証とベーシック認証の両方
の一般的なサポートを提供します。 -
webrick
/ httpauth / authenticator (54001.0) -
HTTP 認証で利用するモジュールを提供するライブラリです。
HTTP 認証で利用するモジュールを提供するライブラリです。 -
Prime
:: EratosthenesGenerator # next -> Integer (45301.0) -
次の(擬似)素数を返します。なお、この実装においては擬似素数は真に素数です。
次の(擬似)素数を返します。なお、この実装においては擬似素数は真に素数です。
また内部的な列挙位置を進めます。
//emlist[例][ruby]{
require 'prime'
generator = Prime::EratosthenesGenerator.new
p generator.next #=> 2
p generator.next #=> 3
p generator.succ #=> 5
p generator.succ #=> 7
p generator.next #=> 11
//} -
Prime
:: EratosthenesGenerator # rewind -> nil (45301.0) -
列挙状態を巻き戻します。
列挙状態を巻き戻します。
//emlist[例][ruby]{
require 'prime'
generator = Prime::EratosthenesGenerator.new
p generator.next #=> 2
p generator.next #=> 3
p generator.next #=> 5
generator.rewind
p generator.next #=> 2
//} -
Object
# yield _ self -> Enumerator (36943.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}
値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。
//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'
construct_url(arguments).
... -
Object
# yield _ self {|x| . . . } -> object (36643.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}
値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。
//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'
construct_url(arguments).
... -
WEBrick
:: HTTPAuth :: ProxyAuthenticator :: InfoField -> "Proxy-Authentication-Info" (36601.0) -
キーの名前です。
キーの名前です。 -
WEBrick
:: HTTPAuth :: ProxyAuthenticator :: ResponseField -> "Proxy-Authenticate" (36601.0) -
レスポンスフィールドのキーの名前です。
レスポンスフィールドのキーの名前です。 -
Prime
:: EratosthenesGenerator # succ -> Integer (36301.0) -
次の(擬似)素数を返します。なお、この実装においては擬似素数は真に素数です。
次の(擬似)素数を返します。なお、この実装においては擬似素数は真に素数です。
また内部的な列挙位置を進めます。
//emlist[例][ruby]{
require 'prime'
generator = Prime::EratosthenesGenerator.new
p generator.next #=> 2
p generator.next #=> 3
p generator.succ #=> 5
p generator.succ #=> 7
p generator.next #=> 11
//} -
WEBrick
:: HTTPAuth :: Authenticator # logger -> object (36301.0) -
ロガーオブジェクトを返します。
ロガーオブジェクトを返します。 -
WEBrick
:: HTTPAuth :: Authenticator # realm -> String (36301.0) -
レルムを返します。
レルムを返します。 -
WEBrick
:: HTTPAuth :: Authenticator # userdb -> WEBrick :: HTTPAuth :: Htpasswd | WEBrick :: HTTPAuth :: Htdigest (36301.0) -
認証のためのユーザデータベースを返します。
認証のためのユーザデータベースを返します。
@see WEBrick::HTTPAuth::BasicAuth, WEBrick::HTTPAuth::Htdigest -
WEBrick
:: HTTPAuth :: Authenticator :: AuthException -> Class (36301.0) -
認証失敗時に発生する例外のクラスです。
認証失敗時に発生する例外のクラスです。 -
WEBrick
:: HTTPAuth :: Authenticator :: AuthScheme -> nil (36301.0) -
認証方法を表わします。派生クラスで上書きしなければなりません。
認証方法を表わします。派生クラスで上書きしなければなりません。 -
WEBrick
:: HTTPAuth :: Authenticator :: RequestField -> String (36301.0) -
リクエストフィールドのキーの名前です。
リクエストフィールドのキーの名前です。 -
WEBrick
:: HTTPAuth :: Authenticator :: ResponseField -> String (36301.0) -
レスポンスフィールドのキーの名前です。
レスポンスフィールドのキーの名前です。 -
WEBrick
:: HTTPAuth :: Authenticator :: ResponseInfoField -> String (36301.0) -
レスポンスインフォフィールドのキーの名前です。
レスポンスインフォフィールドのキーの名前です。 -
WEBrick
:: HTTPAuth :: ProxyAuthenticator :: AuthException -> Class (36301.0) -
WEBrick::HTTPStatus::ProxyAuthenticationRequired です。
WEBrick::HTTPStatus::ProxyAuthenticationRequired です。 -
WEBrick
:: HTTPAuth :: ProxyAuthenticator :: RequestField -> "Proxy-Authorization" (36301.0) -
リクエストフィールドのキーの名前です。
リクエストフィールドのキーの名前です。 -
getoptlong (36037.0)
-
getoptlong は、GNU の getopt_long() とまったく同じ方式でコマンド 行オプションの解析を行う Ruby のライブラリです。
getoptlong は、GNU の getopt_long() とまったく同じ方式でコマンド
行オプションの解析を行う Ruby のライブラリです。
=== GNU getopt_long() とは?
GNU getopt_long() は、コマンド行オプションの解析を行う C の関数です。多
くの GNU ソフトウェアがこの関数を使用しています。GNU getopt_long() そし
て getoptlong には、以下のような特徴があります。
* 伝統的な一文字オプションに加えて、長いオプションに対応しています。長
いオプションは `-' の代わりに `--' で始まり... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (27841.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) { . . . } (27841.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Prime
# each(upper _ bound = nil , generator = EratosthenesGenerator . new) -> Enumerator (19801.0) -
全ての素数を順番に与えられたブロックに渡して評価します。
全ての素数を順番に与えられたブロックに渡して評価します。
@param upper_bound 任意の正の整数を指定します。列挙の上界です。
nil が与えられた場合は無限に列挙し続けます。
@param generator 素数生成器のインスタンスを指定します。
@return ブロックの最後に評価された値を返します。
ブロックが与えられなかった場合は、Enumerator と互換性のある外部イテレータを返します。
//emlist[例][ruby]{
require 'prime'
Prime.each(6){|prime| ... -
Prime
. each(upper _ bound = nil , generator = EratosthenesGenerator . new) -> Enumerator (19801.0) -
Prime.instance.each と同じです。
Prime.instance.each と同じです。
@param upper_bound 任意の正の整数を指定します。列挙の上界です。
nil が与えられた場合は無限に列挙し続けます。
@param generator 素数生成器のインスタンスを指定します。
@return ブロックの最後に評価された値を返します。
ブロックが与えられなかった場合は、Enumerator と互換性のある外部イテレータを返します。
@see Prime#each -
Prime
# each(upper _ bound = nil , generator = EratosthenesGenerator . new) {|prime| . . . } -> object (19501.0) -
全ての素数を順番に与えられたブロックに渡して評価します。
全ての素数を順番に与えられたブロックに渡して評価します。
@param upper_bound 任意の正の整数を指定します。列挙の上界です。
nil が与えられた場合は無限に列挙し続けます。
@param generator 素数生成器のインスタンスを指定します。
@return ブロックの最後に評価された値を返します。
ブロックが与えられなかった場合は、Enumerator と互換性のある外部イテレータを返します。
//emlist[例][ruby]{
require 'prime'
Prime.each(6){|prime| ... -
Prime
. each(upper _ bound = nil , generator = EratosthenesGenerator . new) {|prime| . . . } -> object (19501.0) -
Prime.instance.each と同じです。
Prime.instance.each と同じです。
@param upper_bound 任意の正の整数を指定します。列挙の上界です。
nil が与えられた場合は無限に列挙し続けます。
@param generator 素数生成器のインスタンスを指定します。
@return ブロックの最後に評価された値を返します。
ブロックが与えられなかった場合は、Enumerator と互換性のある外部イテレータを返します。
@see Prime#each -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (18493.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.
If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil (18493.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.
If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS... -
NEWS for Ruby 2
. 6 . 0 (18235.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.6.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......ます。
Object#to_d メソッドは Kernel.#BigDecimal() や
BigDecimal.new とは違いがあります。
* 2.0.0 は Ruby 2.6.0 のリリース後すぐにリリースされる予定です。
このバージョンは BigDecimal.new メソッドを含みません。......をリビルドする必要がある負担がなくなります。
* 変更前:
* libruby.2.6.0.dylib
* libruby.2.6.dylib -> libruby.2.6.0.dylib
* libruby.dylib -> libruby.2.6.0.dylib
* 変更後:
* libruby.2.6.dylib
* libruby.dylib -> libruby.2.6.dylib
* mi... -
NEWS for Ruby 2
. 5 . 0 (18217.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
NEWS for Ruby 2.5.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.4.0 以降の変更
=== 言語仕様の変更
* トップレベルの定数参照を削除しました 11547
* do/end ブロック内部で rescue/else/ensure を書けるようになりました 12906
* 文字列の式展... -
Numeric (18127.0)
-
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
数値を表す抽象クラスです。Integer や Float などの数値クラス
は Numeric のサブクラスとして実装されています。
演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッドは、サブクラスで提供されているメソッド
(+, -, *, /, %) を利用して定義されるものがほとんどです。
つまり Numeric で定義されているメソッドは、Numeric のサブクラスとして新たに数値クラスを定義した時に、
演算メソッド(+, -, *, /, %, <=>, coerce)だけを定義すれ... -
演算子式 (18019.0)
-
演算子式 * assign * selfassign * multiassign * range * range_cond * and * or * not * cond
...る舞います。
フリップフロップ (flip-flop) とも呼ばれます。
この振る舞いは 2.6.0 で deprecated になりましたが、元に戻りました。
そのため、2.6.0 から 2.6.3 では使うと「warning: flip-flop is deprecated」という警告がでます。
「..... -
制御構造 (9307.0)
-
制御構造 条件分岐: * if * unless * case 繰り返し: * while * until * for * break * next * redo * retry 例外処理: * raise * begin その他: * return * BEGIN * END
制御構造
条件分岐:
* if
* unless
* case
繰り返し:
* while
* until
* for
* break
* next
* redo
* retry
例外処理:
* raise
* begin
その他:
* return
* BEGIN
* END
Rubyでは(Cなどとは異なり)制御構造は式であって、何らかの値を返すものが
あります(返さないものもあります。値を返さない式を代入式の右辺に置くと
syntax error になります)。
R... -
クラス/メソッドの定義 (9181.0)
-
クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined
クラス/メソッドの定義
* クラス/メソッドの定義:
* class
* singleton_class
* module
* method
* operator
* nest_method
* eval_method
* singleton_method
* class_method
* limit
* 定義に関する操作:
* alias
* undef
* defined
===[a:class] クラス定義
//emlist[例][ruby]{
class Foo < S...