るりまサーチ

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

別のキーワード

  1. matrix l
  2. _builtin $-l
  3. kernel $-l
  4. lupdecomposition l
  5. $-l kernel

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 > >>

OpenSSL::Cipher#final -> String (24301.0)

暗号オブジェクト内部に残されたデータを暗号化/復号化し、文字列で 返します。

...暗号オブジェクト内部に残されたデータを暗号化/復号化し、文字列で
返します。

パディング(OpenSSL::Cipher#padding=)を有効にしている場合は、
残されたデータにパディングを付加した上で暗号化します。...

ObjectSpace.#define_finalizer(obj) {|id| ...} -> Array (12300.0)

obj が解放されるときに実行されるファイナライザ proc を 登録します。同じオブジェクトについて複数回呼ばれたときは置き換えで はなく追加登録されます。固定値 0 と proc を配列にして返します。

...方の注意

以下は、define_finalizer の使い方の悪い例です。

//emlist[悪い例][ruby]{
class Foo
def initialize
ObjectSpace.define_finalizer(self) {
puts "foo"
}
end
end
Foo.new
GC.start
//}

これは、渡された proc の self が obj を参照しつ
づける...
...なりません。

tempfile は、ファイナライザの使い方の
良い例になっています。これは、クラスのコンテキストで Proc を
生成することで上記の問題を回避しています。

//emlist[例][ruby]{
class Bar
def Bar.callback
proc {
puts "ba...
...良いでしょう。

//emlist[例][ruby]{
class Baz
def initialize
ObjectSpace.define_finalizer self, eval(%q{
proc {
raise "baz" rescue puts $!
raise "baz2"
puts "baz3"
}
}, TOPLEVEL_BINDING)
end
end
Baz.new
GC.start

# => baz
//}

@see spec/rubycmd...

ObjectSpace.#define_finalizer(obj, proc) -> Array (12300.0)

obj が解放されるときに実行されるファイナライザ proc を 登録します。同じオブジェクトについて複数回呼ばれたときは置き換えで はなく追加登録されます。固定値 0 と proc を配列にして返します。

...方の注意

以下は、define_finalizer の使い方の悪い例です。

//emlist[悪い例][ruby]{
class Foo
def initialize
ObjectSpace.define_finalizer(self) {
puts "foo"
}
end
end
Foo.new
GC.start
//}

これは、渡された proc の self が obj を参照しつ
づける...
...なりません。

tempfile は、ファイナライザの使い方の
良い例になっています。これは、クラスのコンテキストで Proc を
生成することで上記の問題を回避しています。

//emlist[例][ruby]{
class Bar
def Bar.callback
proc {
puts "ba...
...良いでしょう。

//emlist[例][ruby]{
class Baz
def initialize
ObjectSpace.define_finalizer self, eval(%q{
proc {
raise "baz" rescue puts $!
raise "baz2"
puts "baz3"
}
}, TOPLEVEL_BINDING)
end
end
Baz.new
GC.start

# => baz
//}

@see spec/rubycmd...

ObjectSpace.#undefine_finalizer(obj) -> object (12300.0)

obj に対するファイナライザをすべて解除します。 obj を返します。

...//emlist[例][ruby]{
class Sample
def Sample.callback
proc {
puts "finalize"
}
end

def initialize
ObjectSpace.define_finalizer(self, Sample.callback)
end

def undef
ObjectSpace.undefine_finalizer(self)
end
end

Sample.new
GC.start
# => finalize

Sample.new
sample.u...
...ndef
GC.start
# ※何も出力されない
//}

@see ObjectSpace.#define_finalizer...

CGI::HtmlExtension#html(attributes = {}) -> String (6314.0)

トップレベルの html 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

...tml 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。

@param attributes 属性をハッシュで指定します。
擬似属性の "PRETTY" に文字列を与えるとその文字列でインデントした HTML...
...html{ "string" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML>string</HTML>

html({ "LANG" => "ja" }){ "string" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML LANG="ja">string</HTML>

html({ "DOCTYPE" => false }){ "string" }
# <HTML>string</HTML>...
...html({ "DOCTYPE" => '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">' }){ "string" }
# <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML>string</HTML>

html({ "PRETTY" => " " }){ "<BODY></BODY>" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
# <HTML>
# <BODY>...

絞り込み条件を変える

CGI::HtmlExtension#html(attributes = {}) { ... } -> String (6314.0)

トップレベルの html 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

...tml 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。

@param attributes 属性をハッシュで指定します。
擬似属性の "PRETTY" に文字列を与えるとその文字列でインデントした HTML...
...html{ "string" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML>string</HTML>

html({ "LANG" => "ja" }){ "string" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML LANG="ja">string</HTML>

html({ "DOCTYPE" => false }){ "string" }
# <HTML>string</HTML>...
...html({ "DOCTYPE" => '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">' }){ "string" }
# <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML>string</HTML>

html({ "PRETTY" => " " }){ "<BODY></BODY>" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
# <HTML>
# <BODY>...

Module#ruby2_keywords(method_name, ...) -> nil (3248.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

...hrough
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword arguments, the final hash argument is marked with a special
flag such that...
...is the final element of a normal argument splat to
another method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passed through the method to
other methods.

This should only be used fo...
...ethods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.

This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the module responds to...

OpenSSL::Cipher#update(data) -> String (3106.0)

渡された文字列を暗号化もしくは復号化して文字列として返します。

...文字列を暗号化もしくは復号化して文字列として返します。

どちらがなされるかは直前に OpenSSL::Cipher#encrypt もしくは
OpenSSL::Cipher#decrypt のいずれが呼びだされたかに
よって決まります。

ブロック暗号を利用する場合は、...
...存され、次の文字列が渡されたときに使われます。

暗号化/復号化すべきデータを渡し終えた後は、
OpenSSL::Cipher#final
を呼びだして暗号オブジェクト内部に残されたデータを暗号化/復号化
する必要があります。


@param data...

正規表現 (510.0)

正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references

...string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references


正規表現(regular expression)は文字列のパターンを記述するための言語...
...ことが
できます。

//emlist[][ruby]{
place = "東京都"
/#{place}/.match("Go to 東京都") # => #<MatchData "東京都">
//}

埋め込んだ文字列にメタ文字が含まれているならば、それは
メタ文字として認識されます。

//emlist[][ruby]{
number = "(\\d+)"
op...
...]] && ^Control && ^Unassigned && ^Surrogate)
* [:lower:] 小文字 (Lowercase_Letter)
* [:print:] 表示可能な文字(空白を含む) ([[:graph:]] | Space_Separator)
* [:punct:] 句読点 (Connector_Punctuation | Dash_Punctuation | Close_Punctuation | Final_Punctuation | Initial_Punctuation...

GC.stat(result_hash = {}) -> {Symbol => Integer} (306.0)

GC 内部の統計情報を Hash で返します。

...GC 内部の統計情報を Hash で返します。

@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。


@param key 得ら...
...ol で指定します。

@return GC 内部の統計情報をHash で返します。
引数 key を指定した場合は数値を返します。

GC.stat
# =>
{
:count=>2,
:heap_used=>9,
:heap_length=>11,
:heap_increment=>2,
:heap_live_slot=>6836,
:heap_free_slo...
...>519,
:heap_final_slot=>0,
:heap_swept_slot=>818,
:total_allocated_object=>7674,
:total_freed_object=>838,
:malloc_increase=>181034,
:malloc_limit=>16777216,
:minor_gc_count=>2,
:major_gc_count=>0,
:remembered_shady_object=>55,
:remembered_shady_object_limit=>...
...Symbol で指定します。

@return GC 内部の統計情報をHash で返します。
引数 key を指定した場合は数値を返します。

GC.stat
# =>
{
:count=>0,
:heap_allocated_pages=>24,
:heap_sorted_length=>24,
:heap_allocatable_pages=>0,...
...p_available_slots=>9783,
:heap_live_slots=>7713,
:heap_free_slots=>2070,
:heap_final_slots=>0,
:heap_marked_slots=>0,
:heap_swept_slots=>0,
:heap_eden_pages=>24,
:heap_tomb_pages=>0,
:total_allocated_pages=>24,
:total_freed_pages=>0,
:total_allocated...

絞り込み条件を変える

<< 1 2 > >>