1043件ヒット
[1-100件を表示]
(0.033秒)
ライブラリ
- ビルトイン (493)
- logger (24)
-
net
/ telnet (2) - openssl (48)
- prettyprint (12)
- shell (6)
-
shell
/ command-processor (84) -
shell
/ process-controller (6) - tracer (24)
-
webrick
/ httpauth / basicauth (12) -
webrick
/ httpproxy (12) -
webrick
/ httpserver (12) -
webrick
/ httpservlet / prochandler (12)
クラス
- Enumerator (31)
-
Enumerator
:: Yielder (6) - Hash (93)
- LocalJumpError (24)
- Logger (24)
- Method (36)
- Module (24)
-
Net
:: Telnet (2) - Object (36)
-
OpenSSL
:: SSL :: SSLContext (48) - PrettyPrint (12)
- Proc (55)
- Shell (6)
-
Shell
:: CommandProcessor (84) -
Shell
:: ProcessController (6) - Thread (24)
- TracePoint (7)
- Tracer (24)
-
WEBrick
:: HTTPProxyServer (12) -
WEBrick
:: HTTPServer (12) -
WEBrick
:: HTTPServlet :: ProcHandler (12)
モジュール
- Kernel (73)
- Marshal (24)
- ObjectSpace (36)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - BasicAuth (12)
- Marshal フォーマット (12)
- Method (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) - Proc (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Ruby用語集 (12)
- [] (18)
-
add
_ trace _ func (12) - cat (6)
-
client
_ cert _ cb= (12) - default (24)
-
default
_ proc (12) -
define
_ finalizer (24) -
define
_ method (24) - drb (12)
- dump (24)
- echo (6)
-
exit
_ value (12) - foreach (6)
- format (12)
- formatter (12)
- formatter= (12)
- glob (6)
- inspect (12)
- irb (12)
- lambda (18)
- lambda? (12)
- link (6)
- logger (12)
- mkdir (6)
- out (6)
- parameters (19)
- preprocess (2)
-
proc
_ new (12) -
proc
_ s _ new (12) -
rb
_ proc _ new (12) - reason (12)
-
renegotiation
_ cb= (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12) - send (24)
-
session
_ new _ cb (12) -
session
_ new _ cb= (12) -
set
_ get _ line _ procs (24) -
set
_ trace _ func (12) - shift (9)
- size (12)
-
source
_ location (12) - symlink (6)
- system (6)
- tee (6)
- test (6)
-
to
_ proc (30) -
to
_ s (12) -
trace
_ var (36) - transact (6)
-
undef
_ system _ command (6) -
undefine
_ finalizer (12) -
values
_ at (12) - クラス/メソッドの定義 (12)
- セキュリティモデル (12)
- メソッド呼び出し(super・ブロック付き・yield) (12)
- 手続きオブジェクトの挙動の詳細 (12)
検索結果
先頭5件
-
static VALUE proc
_ s _ new(int argc , VALUE *argv , VALUE klass) (32232.0) -
Proc.new の実体。
...
Proc.new の実体。... -
static VALUE proc
_ new(VALUE klass) (32216.0) -
評価器のその時点でのスナップショットを保存する Proc オブジェクトを生成します。クラスを klass にします。
...評価器のその時点でのスナップショットを保存する
Proc オブジェクトを生成します。クラスを klass にします。... -
Proc
. new -> Proc (27288.0) -
ブロックをコンテキストとともにオブジェクト化して返します。
...OSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生します。
ブロックを指定しなければ、こ......にブロックがないのにブロックを省略した呼び出しを行ったときに発生します。
//emlist[例][ruby]{
def foo
pr = Proc.new
pr.call(1)
end
foo {|arg| p arg }
# => 1
//}
これは以下と同じです。
//emlist[例][ruby]{
def foo
yield(1)
end
foo {|arg| p arg }......entError が発生します。
//emlist[例][ruby]{
def foo
Proc.new
end
foo
# => -:2:in `new': tried to create Proc object without a block (ArgumentError)
# from -:2:in `foo'
# from -:4:in `<main>'
//}
Proc.new は、Proc#initialize が定義されていれば
オブジェクト... -
Proc
. new { . . . } -> Proc (27288.0) -
ブロックをコンテキストとともにオブジェクト化して返します。
...OSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生します。
ブロックを指定しなければ、こ......にブロックがないのにブロックを省略した呼び出しを行ったときに発生します。
//emlist[例][ruby]{
def foo
pr = Proc.new
pr.call(1)
end
foo {|arg| p arg }
# => 1
//}
これは以下と同じです。
//emlist[例][ruby]{
def foo
yield(1)
end
foo {|arg| p arg }......entError が発生します。
//emlist[例][ruby]{
def foo
Proc.new
end
foo
# => -:2:in `new': tried to create Proc object without a block (ArgumentError)
# from -:2:in `foo'
# from -:4:in `<main>'
//}
Proc.new は、Proc#initialize が定義されていれば
オブジェクト......行ったときに発生します。
//emlist[][ruby]{
pr = Proc.new {|arg| p arg }
pr.call(1) # => 1
//}
//emlist[][ruby]{
Proc.new # => -e:1:in `new': tried to create Proc object without a block (ArgumentError)
//}
Proc.new は、Proc#initialize が定義されていれば
オブジェクトの......初期化のためにこれを呼び出します。このことを
除けば、Kernel.#proc と同じです。... -
WEBrick
:: HTTPServlet :: ProcHandler . new(proc) -> WEBrick :: HTTPServlet :: ProcHandler (21320.0) -
自身を初期化します。
...自身を初期化します。
@param proc Proc オブジェクトを与えます。クライアントからのリクエストがあった時、
proc.call(request, response) のように呼び出されます。
request, response はそれぞれ WEBrick::HTTPRequest オブ... -
Shell
:: CommandProcessor . new(shell) (21101.0) -
@todo
@todo -
Shell
:: ProcessController . new(shell) (21101.0) -
自身を初期化します。
自身を初期化します。
@param shell Shell のインスタンスを指定します。 -
WEBrick
:: HTTPProxyServer . new(config , default = WEBrick :: Config :: HTTP) -> WEBrick :: HTTPProxyServer (18185.0) -
プロクシオブジェクトを生成して返します。
...ッシュのキーとその値は WEBrick::HTTPServer.new と同じです。
それに加えて以下のキーが有効です。
: :ProxyAuthProc
プロクシ認証を行う Proc オブジェクトを指定します。この proc は
WEBrick::HTTPResponse オブジェクトと WEB......rick::HTTPRequest オブジェクトを引数として
proc.call(req, res) のように呼ばれます。
認証に失敗した場合 proc は適切な例外を発生させなければいけません。nil を指定した場合すべての接続を
受け付けます。デフォルトは nil......proxy'
auth_proc = proc{|req, res|
unless c = req['proxy-authorization']
res['Proxy-Authenticate'] = 'Basic realm="WEBrick Proxy"'
raise WEBrick::HTTPStatus::ProxyAuthenticationRequired
else
# 略
end
}
s = WEBrick::HTTPProxyServer.new(ProxyAuthProc: auth_proc, Port: 8080)... -
Hash
. new {|hash , key| . . . } -> Hash (18146.0) -
空の新しいハッシュを生成します。ブロックの評価結果がデフォルト値になりま す。設定したデフォルト値はHash#default_procで参照できます。
...ハッシュを生成します。ブロックの評価結果がデフォルト値になりま
す。設定したデフォルト値はHash#default_procで参照できます。
値が設定されていないハッシュ要素を参照するとその都度ブロックを
実行し、その結果を返......ト値は全部同一のオブジェクトなので、
# 破壊的変更によって他のキーに対応する値も変更されます。
h = Hash.new("foo")
p h[1] #=> "foo"
p h[1].object_id #=> 6127170
p h[1] << "bar" #=> "foobar"
p h[1] #=> "foob......値がまだ無いキーが呼び出される度に
# ブロックを評価するので、全て別のオブジェクトになります。
h = Hash.new {|hash, key| hash[key] = "foo"}
p h[1] #=> "foo"
p h[1].object_id #=> 6126900
p h[1] << "bar" #=> "foobar"
p h[1]... -
Hash
. new(ifnone = nil) -> Hash (18131.0) -
空の新しいハッシュを生成します。ifnone はキーに対 応する値が存在しない時のデフォルト値です。設定したデフォルト値はHash#defaultで参照できます。
...省略した Hash.new は {} と同じです。
デフォルト値として、毎回同一のオブジェクトifnoneを返します。
それにより、一箇所のデフォルト値の変更が他の値のデフォルト値にも影響します。
//emlist[][ruby]{
h = Hash.new([])
h[0] << 0
h[......[ruby]{
h = Hash.new([])
p h[1] #=> []
p h[1].object_id #=> 6127150
p h[1] << "bar" #=> ["bar"]
p h[1] #=> ["bar"]
p h[2] #=> ["bar"]
p h[2].object_id #=> 6127150
p h #=> {}
h = Hash.new([].freeze)
h[0]...