るりまサーチ

最速Rubyリファレンスマニュアル検索!
81件ヒット [1-81件を表示] (0.063秒)
トップページ > クエリ:String[x] > クエリ:==[x] > クエリ:header[x]

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub

ライブラリ

クラス

検索結果

CGI#header(options = "text/html") -> String (18244.0)

HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。

...するための情報を指定します。

例:
header

# Content-Type: text/html

header
("text/plain")
# Content-Type: text/plain

header
({"nph" => true,
"status" => "OK", # == "200 OK"
# "status" => "20...
...e.now + 30,
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"})

例:
cgi = CGI.new('html3')
print cgi.header({"charset" => "shift_jis", "status" => "OK"})
print "<html><head><title>TIT...

ruby 1.6 feature (396.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...(<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

==
1.6.8 (2002-12-24) -> stable-snapshot

: 2003-01-22: errno

EAGAIN と EWOULDBLOCK が同じ値のシステムで、EWOULDBLOCK がなくなっ...
...りました。

p "#{ "" }"

=> ruby 1.6.7 (2002-03-01) [i586-linux]
""

=> -:1: warning: bad substitution in string
ruby 1.6.7 (2002-09-12) [i586-linux]
"#{ }"

=> ruby 1.6.7 (2002-09-25) [i586-linux]
""

これは1.7...
...1303>))

: CGI#header

以下のようなスクリプトでTEXT_PLAINが"text/plain; charset=iso-8859-1"
のように書き換えられていました。
((<ruby-dev:14716>))

require 'cgi'

TEXT_PLAIN = "text/plain"

cgi = CGI.new
print cgi.header("type" => TEX...

NEWS for Ruby 3.0.0 (324.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストはリンク先を参照してください。

==
言語仕様の変更

* Keyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2....
...", "f", 3]
in [*pre, String => x, String => y, *post]
p pre #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p post #=> [2, "d", "e", "f", 3]
end
//}

* Endless method definition is added. [EXPERIMENTAL]
16746

//emlist{
def square(x) = x * x
//}

* Interpolated String literals are no lo...
...ame have been added to skip hostname verification. 16555
* Net::HTTP.get, Net::HTTP.get_response, and Net::HTTP.get_print can take the request headers as a Hash in the second argument when the first argument is a URI. 16686
* Net::SMTP
* Add SNI support.
* Net::SMTP.start arguments a...

ruby 1.8.4 feature (144.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...など(互換性のない変更)
* [obsolete]: 廃止された(される予定の)機能
* [platform]: 対応プラットフォームの追加

==
目次

* ((<ruby 1.8.4 feature/Ruby本体>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 feature/Symbol [bug]>))
* ((<ruby 1.8.4 f...
...e (Win全般) [bug]>))
* ((<ruby 1.8.4 feature/File::Stat#pipe? [bug]>))
* ((<ruby 1.8.4 feature/Array#fill [bug]>))
* ((<ruby 1.8.4 feature/String#scan [bug]>))
* ((<ruby 1.8.4 feature/File.join [bug]>))
* ((<ruby 1.8.4 feature/Thread#pass [bug]>))
* ((<ruby 1.8.4 feature/Module#const_m...
...:CGIHandler#do_GET): the value of Set-Cookie:
# header field should be splited into each cookie. [ruby-Bugs:2199]
#
# * lib/webrick/cookie.rb (WEBrick::Cookie.parse_set_cookie): new method
# to parse the value of Set-Cookie: header field.
#
# * test/webrick/test_cookie.r...

ruby 1.9 feature (132.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

...ムの追加

==
1.9.0

==
= 2006-09-16

: Struct#inspect

==
= 2006-09-14

: digest.rb
: Digest::Base.file

==
= 2006-09-13

: Hash#compare_by_identity
: Hash#compare_by_identity?
: Hash#identical
: Hash#identical?

==
= 2006-09-12

: Hash#compare_by_identity
: Hash#compare_by_identity?

==
= 2006-09-11...
...け取るようになりました [compat]
: String#unpack("M") で CRLF を単独の LF と同様に無視するようになりました ((<ruby-dev:28601>)) [compat]

* M17N
: 以下、ここでいう「1文字」は 1byte のことです
: String#ord という、1文字の文字列に対...
...追加。

==
= 2004-03-10

: ((<組み込み変数/$-W>)) [ruby] [new]
追加

==
= 2004-03-07
: Net::HTTPHeader#add_header [lib] [new]
: Net::HTTPHeader#get_fields [lib] [new]
: Net::HTTPHeader#content_length= [lib] [new]
: Net::HTTPHeader#content_type [lib] [new]
: Net::HTTPHeader#main_typ...

絞り込み条件を変える

NEWS for Ruby 2.0.0 (114.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

==
1.9.3 以降の変更

==
= 言語仕様の変更

* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加し...
...* String
* 追加: String#b エンコーディングを ASCII-8BIT に設定したコピーされた文字列を返します
* 返り値変更:
* String#lines Enumerator ではなく Array を返します
* String#chars Enumerator ではなく Array を返します
* String...
...synchronize, Mutex#sleep
* 上を参照

==
= 標準添付ライブラリの更新 (優れたもののみ)

* cgi
* HTML5 用のタグメーカーを追加しました
* CGI#header は CGI#http_header に名前を変更しました。CGI#header は別名として残っています。...

ruby 1.8.3 feature (66.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...います。
* ((<URL:http://dev.ctor.org/soap4r/wiki/Changes-154>))
* ((<URL:http://dev.ctor.org/soap4r/wiki/Changes-155>))

==
1.8.2 (2004-12-25) -> 1.8.3 (2005-09-21)

==
= 2005-09-19
: FileUtils.remove_entry_secure [lib] [new]
: FileUtils.remove_entry [lib] [new]
: FileUtils.chmod_R...
...

==
= 2005-09-16
: File.join [ruby] [compat]

型チェックを厳密にするようになりました。

$ ruby-1.8.2 -e 'p File.join(1, 2)'
"1/2"

$ ruby-1.8.3 -e 'p File.join(1, 2)'
-e:1:in `join': can't convert Fixnum into String (TypeError)
from -e:1

==
=...
..."

==
= 2005-09-13
: Logger#formatter [lib] [new]
: Logger#formatter= [lib] [new]
: Logger::Formatter [lib] [new]

追加。

==
= 2005-09-13
: Net::HTTP

https での Proxy 認証をサポートするようになりました。

: Net::HTTP.post_form(url, params) [lib] [new]

: Net::HTTPHeader#...

CGI#out(options = "text/html") { .... } (60.0)

HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。

...HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。

HEADリクエスト (REQUEST_METHOD == "HEAD") の場合は HTTP ヘッダのみを出力します。

charset が "iso-2022-jp"・"euc-jp"・"shift_jis" のいずれかで
ある場合は文字列エ...
...CGI.new
cgi.out{ "string" }
# Content-Type: text/html
# Content-Length: 6
#
# string

cgi.out("text/plain"){ "string" }
# Content-Type: text/plain
# Content-Length: 6
#
# string

cgi.out({"nph"...
...tml; charset=iso-2022-jp
"language" => "ja",
"expires" => Time.now + (3600 * 24 * 30),
"cookie" => [cookie1, cookie2],
"my_header1" => "my_value",
"my_header2" => "my_value"}){ "string" }

@see CGI#header...