種類
- インスタンスメソッド (49)
- 文書 (31)
ライブラリ
- ビルトイン (38)
-
webrick
/ httpresponse (11)
クラス
- Encoding (22)
- Time (16)
-
WEBrick
:: HTTPResponse (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - chunked= (11)
- inspect (5)
- name (11)
検索結果
先頭5件
-
Encoding
# to _ s -> String (48213.0) -
エンコーディングの名前を返します。
...エンコーディングの名前を返します。
//emlist[例][ruby]{
Encoding::UTF_8.name #=> "UTF-8"
//}... -
Encoding
# name -> String (33113.0) -
エンコーディングの名前を返します。
...エンコーディングの名前を返します。
//emlist[例][ruby]{
Encoding::UTF_8.name #=> "UTF-8"
//}... -
Time
# to _ s -> String (21225.0) -
時刻を文字列に変換した結果を返します。 以下のようにフォーマット文字列を使って strftime を呼び出すのと同じです。
...字列を使って strftime を呼び出すのと同じです。
//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5,6)
p t.to_s # => "2000-01-02 03:04:05 +0900"
p t.strftime("%Y-%m-%d %H:%M:%S %z") # => "2000-01-02 03:04:05 +0900"
p t.utc.to_s......# => "2000-01-01 18:04:05 UTC"
p t.strftime("%Y-%m-%d %H:%M:%S UTC") # => "2000-01-01 18:04:05 UTC"
//}
戻り値の文字エンコーディングは Encoding::US_ASCII です。... -
Time
# inspect -> String (6218.0) -
時刻を文字列に変換した結果を返します。
...返します。
Time#to_s とは異なりナノ秒まで含めて返します。
//emlist[][ruby]{
t = Time.now
t.inspect #=> "2012-11-10 18:16:12.261257655 +0100"
t.strftime "%Y-%m-%d %H:%M:%S.%N %z" #=> "2012-11-10 18:16:12.261257655 +0100"
t.utc.inspect......#=> "2012-11-10 17:16:12.261257655 UTC"
t.strftime "%Y-%m-%d %H:%M:%S.%N UTC" #=> "2012-11-10 17:16:12.261257655 UTC"
//}
戻り値の文字エンコーディングは Encoding::US_ASCII です。... -
WEBrick
:: HTTPResponse # chunked=(flag) (3018.0) -
真に設定するとクライアントに返す内容(エンティティボディ)を chunk に分けるようになります。
...rick::HTTPResponse#request_http_version が 1.0 以下である場合、この値は無視されます。
@param flag true を指定した場合、レスポンスを chunk に分けてクライアントに返します。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersio......n => "1.1" } )
res.body = 'hoge'
res.chunked = true
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 09:04:28 GMT
Server:
Transfer-Encoding: chunked
4
hoge
0
#... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (618.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...の変更点(まとめ)/Windows 対応>))
* ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>))
* ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>))
* ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>))
* ((<1.6.8から1.8.0......yield の値を返す
ことができるようになりました。(この機能はまだ実験です)
break [n] はイテレータを終了させ、n がそのイテレータの戻り値になります。
next [n] はブロックを抜け、n が yield の戻り値になります。
: to_st......w(//is, Regexp::EXTENDED, "e")
=> ruby 1.6.8 (2003-08-03) [i586-linux]
//xe
=> -:1: warning: flags and encoding ignored
ruby 1.8.0 (2003-02-16) [i586-linux]
//is
=== String
: ((<String#chomp|String/chomp>)) [change]
: ((<String#chomp!|String/... -
NEWS for Ruby 2
. 0 . 0 (78.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 1.9.3 以降の変更
=== 言語仕様の変更
* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加しました。(%w, %W に......義したときの名前ではなく呼び出したときの名前を返します。
* 非互換: Object#inspect は #to_s を呼び出さなくなりました。再定義された #to_s を呼び出すためです。
* LoadError
* 追加: LoadError#path ロードできなかったファ......cations and
Kernel#caller_locations
* 非互換: Thread#join, Thread#value は対象のスレッドがメインスレッドか現在のスレッドである場合、
ThreadError を発生させます
* Time
* 返り値変更:
* Time#to_s now returns US-ASCII encoding ins... -
NEWS for Ruby 2
. 7 . 0 (72.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ルか bugs.ruby-lang.org の issue を参照してください。
== 2.6.0 以降の変更
=== 言語仕様の変更
==== パターンマッチ
* パターンマッチが実験的機能として導入されました。 14912
//emlist[][ruby]{
case [0, [1, 2, 3]]
in [a, [b, *c]]
p a #=> 0......「Warning[:deprecated] = false」
としてください。
==== 番号指定パラメータ
* 番号指定パラメータ(Numbered parameters)がデフォルトのブロックの仮引数として
導入されました。 4475
//emlist[][ruby]{
[1, 2, 10].map { _1.to_s(16) } #=......<=> 0i」がNoMethodErrorを発生しなくなりました。 15857
* Dir
* 変更されたメソッド
* Dir.globとDir.[] がNUL文字区切りのグロブパターンを受け付けなくなりました。
代わりにArrayを使ってください。 14643
* Encoding... -
NEWS for Ruby 3
. 0 . 0 (48.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting......* Dir.glob and Dir.[] now sort the results by default, and accept the `sort:` keyword option. 8709
* ENV
* ENV.except has been added, which returns a hash excluding the given keys and their values. 15822
* Windows: Read ENV names and values as UTF-8 encoded Strings 12650
* Encoding......ed new encoding IBM720. 16233
* Changed default for Encoding.default_external to UTF-8 on Windows 16604
* Fiber
* Fiber.new(blocking: true/false) allows you to create non-blocking execution contexts. 16786
* Fiber#blocking? tells whether the fiber is non-blocking. 16786
* Fiber#ba...