ライブラリ
- ビルトイン (95)
-
cgi
/ html (24) - coverage (8)
- mkmf (48)
-
net
/ http (24) -
net
/ imap (24) -
net
/ pop (12) -
net
/ smtp (24) - prime (96)
- rake (12)
-
rdoc
/ context (12) -
rubygems
/ dependency _ list (12) - socket (36)
- time (24)
- timeout (21)
-
webrick
/ httpauth / authenticator (168) -
webrick
/ httpauth / basicauth (12) -
webrick
/ httpauth / digestauth (12) -
webrick
/ httpstatus (24) - win32ole (12)
クラス
- Coverage (8)
-
Gem
:: DependencyList (12) -
Net
:: IMAP (24) -
Net
:: SMTP (12) - Object (28)
- Prime (48)
-
Prime
:: EratosthenesGenerator (36) - Proc (48)
-
RDoc
:: Context (12) -
Rake
:: FileList (12) - Range (7)
- Socket (12)
- Time (24)
-
WEBrick
:: HTTPAuth :: BasicAuth (12) -
WEBrick
:: HTTPAuth :: DigestAuth (12) - WIN32OLE (12)
モジュール
-
CGI
:: HtmlExtension (24) - Kernel (48)
-
Socket
:: Constants (12) - Timeout (21)
-
WEBrick
:: HTTPAuth :: Authenticator (96) -
WEBrick
:: HTTPAuth :: ProxyAuthenticator (48) -
WEBrick
:: HTTPStatus (12)
キーワード
- === (19)
- ARGV (12)
- AuthException (24)
- AuthScheme (12)
- Authenticator (12)
- EratosthenesGenerator (12)
- HTTPNetworkAuthenticationRequired (12)
- HTTPProxyAuthenticationRequired (12)
- InfoField (12)
-
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) - Numeric (12)
- POPAuthenticationError (12)
- ProxyAuthenticationRequired (12)
- ProxyAuthenticator (12)
-
RC
_ PROXY _ AUTHENTICATION _ REQUIRED (12) - RequestField (24)
- ResponseField (24)
- ResponseInfoField (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- SMTPAuthenticationError (12)
-
SO
_ SECURITY _ AUTHENTICATION (24) - TCPSocket (12)
- [] (12)
-
add
_ authenticator (12) - authenticate (48)
- call (12)
-
check
_ signedness (24) -
convertible
_ int (24) -
dependency
_ order (12) - each (48)
- exclude (12)
-
find
_ symbol (12) - getoptlong (12)
- html (24)
- logger (12)
- next (12)
- realm (12)
- rewind (12)
- start (8)
- strptime (24)
- succ (12)
- timeout (21)
- userdb (12)
-
webrick
/ httpauth / authenticator (12) - yield (12)
-
yield
_ self (14) - クラス/メソッドの定義 (12)
- プログラム・文・式 (12)
- 制御構造 (12)
- 演算子式 (12)
検索結果
先頭5件
-
NEWS for Ruby 2
. 5 . 0 (26024.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 を書けるようになりまし......ことができます。
//emlist[][ruby]{
Coverage.result
#=> { "/path/to/file.rb"=>
# { :lines => [1, 2, 0, nil, ...],
# :branches =>
# { [:if, 0, 2, 1, 6, 4] =>
# { [:then, 1, 3, 2, 3, 8] => 0,
# [:else, 2, 5, 2, 5, 8] => 2
# }
# },... -
NEWS for Ruby 2
. 7 . 0 (26024.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.7.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.6.0 以降の変更
=== 言語仕様の変更
==== パターンマッチ
* パターンマッチが実験的機能として導入されました。 14912
//emlist[][ruby]{
case [0, [1, 2, 3]]
in [a, [b......nd
//}
//emlist[][ruby]{
case {a: 0, b: 1}
in {a: 0, x: 1}
:unreachable
in {a: 0, b: var}
p var #=> 1
end
//}
//emlist[][ruby]{
case -1
in 0 then :unreachable
in 1 then :unreachable
end #=> NoMatchingPatternError
//}
//emlist{
json = <<END
{
"name": "Alice",
"age": 30,
"children": [{ "n... -
NEWS for Ruby 2
. 6 . 0 (26012.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.6.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......トは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.5.0 以降の変更
=== 言語仕様の変更
* $SAFE はプロセスグローバルで扱われることになると共に、0以外を設定した後に0に戻せるようになりました。 14......11258
* Kernel
* 別名
* Object#then が Object#yield_self の別名として追加されました。 14594
* 新規オプション
* Kernel.#Complex, Kernel.#Float, Kernel.#Integer,
Kernel.#Rational にエラー処理方法を指定する :exception オプション... -
Object
# then -> Enumerator (24208.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...]{
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).
yield_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条......件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# then {|x| . . . } -> object (24208.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...]{
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).
yield_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条......件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Prime
:: EratosthenesGenerator (18000.0) -
Prime::PseudoPrimeGenerator の具象クラスです。 素数の生成にエラトステネスのふるいを使用しています。
...Prime::PseudoPrimeGenerator の具象クラスです。
素数の生成にエラトステネスのふるいを使用しています。... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (15416.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_O......F_', 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 preprocesso......r macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
done.... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil (15416.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_O......F_', 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 preprocesso......r macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
done.... -
Prime
:: EratosthenesGenerator # next -> Integer (15100.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
//}... -
Net
:: HTTPNetworkAuthenticationRequired (15000.0) -
HTTP レスポンス 511 (Network Authentication Required) を表現するクラスです。
...HTTP レスポンス 511 (Network Authentication Required) を表現するクラスです。
詳しくは 6585 を見てください。... -
Net
:: POPAuthenticationError (15000.0) -
POP3 で認証に失敗したときに発生します。
POP3 で認証に失敗したときに発生します。