るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

検索結果

<< 1 2 3 > >>

GC::Profiler.result -> String (21213.0)

GC のプロファイル情報をフォーマットし、文字列として返します。

...の発生ごとに集計します。
以下は、5 回 GC が発生した場合の実行例です。

$ ruby -e "GC::Profiler.enable; a = Array.new(100000){ 'aa' }; puts GC::Profiler.result"
GC 5 invokes.
Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object...
...Time
Ruby が起動してから GC が起動するまでに経過した時間
: Use Size
ヒープ内での使用サイズ
: Total Size
ヒープ全体のサイズ
: Total Object
ヒープ内に存在するオブジェクトの個数
: GC Time
GC の処理時間

@see GC::Profiler.report...

GC::Profiler.report(out = $stdout) -> nil (3122.0)

GC::Profiler.result の結果を out に出力します。

...GC::Profiler.result の結果を out に出力します。

@param out 結果の出力先を指定します。デフォルトは $stdout です。

//emlist[例][ruby]{
GC::Profiler.enable
GC.start
GC::Profiler.report

# => GC 4 invokes.
# Index Invoke Time(sec) Use Size(byte) Total Si...
...ze(byte) Total Object GC Time(ms)
# 1 0.019 303720 1269840 31746 1.25899999999999967493
//}

@see GC::Profiler.result...

GC::Profiler.raw_data -> [Hash, ...] | nil (3112.0)

GC のプロファイル情報を GC の発生ごとに Hash の配列 (:GC_INVOKE_TIME が早いもの順)で返します。GC::Profiler が有効になっ ていない場合は nil を返します。

...C_INVOKE_TIME が早いもの順)で返します。GC::Profiler が有効になっ
ていない場合は nil を返します。

例:

GC::Profiler.enable
GC.start
GC::Profiler.raw_data
# => [
{
:GC_TIME=>1.3000000000000858e-05,
:GC_INVOKE_TIME=>0.010634999999999999,...
...、GC_PROFILE_MORE_DETAIL を有効にして Ruby をビルドした場合、以下の
キーも参照できます。

* :GC_MARK_TIME
* :GC_SWEEP_TIME
* :ALLOCATE_INCREASE
* :ALLOCATE_LIMIT
* :HEAP_USE_SLOTS
* :HEAP_LIVE_OBJECTS
* :HEAP_FREE_OBJECTS
* :HAVE_FINALIZE

@see GC::Profiler.repor...
...t, GC::Profiler.result...

NEWS for Ruby 3.0.0 (498.0)

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

...nal 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 a sing...
...mlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesigned. [EXPERIMENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in...
...> 0

{b: 0, c: 1} => {b:}
p b #=> 0
//}

//emlist{
# version 3.0
0 in 1 #=> false

# version 2.7
0 in 1 #=> raise NoMatchingPatternError
//}

* Find-pattern is added. [EXPERIMENTAL]
16828

//emlist{
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
in [*pre, String => x, String => y, *post]
p pr...

Encoding::Converter#primitive_errinfo -> Array (328.0)

直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。

...ter#primitive_convert による変換の結果を保持する五要素の配列を返します。

@return [result, enc1, enc2, error_bytes, readagain_bytes] という五要素の配列

result
は直前の primitive_convert の戻り値です。
それ以外の四要素は :invalid_byte_sequence...
...s invalid as EUC-JP.
ec = Encoding::Converter.new("EUC-JP", "Shift_JIS")
ec.primitive_convert(src="\xff", dst="", nil, 10)
p ec.primitive_errinfo
#=> [:invalid_byte_sequence, "EUC-JP", "Shift_JIS", "\xFF", ""]

# HIRAGANA LETTER A (\xa4\xa2 in EUC-JP) is not representable in ISO-8859-1.
# Since this...
...ve_errinfo
#=> [:source_buffer_empty, nil, nil, nil, nil]

# \xd8\x00\x00@ is invalid as UTF-16BE because
# no low surrogate after high surrogate (\xd8\x00).
# It is detected by 3rd byte (\00) which is part of next character.
# So the high surrogate (\xd8\x00) is discarded and
# the 3rd byte is read...

絞り込み条件を変える

NEWS for Ruby 3.1.0 (312.0)

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

...では、

//emlist[][ruby]{
foo[0] = bar
//}

* 次の評価順序になります。

//emlist{
1. `foo`
2. `bar`
3. `[]=` called on the result of `foo`
//}

* Ruby 3.1.0より前は、多重代入の評価順序が上記のようではありませんでした。このコードでは、...
...ed on the result of `foo`
5. `bar`
6. `baz=` called on the result of `bar`
//}

* Ruby 3.1.0から単一代入と評価順序が一致するようになり、左が右より先に評価されます。

//emlist{
1. `foo`
2. `bar`
3. `a`
4. `b`
5. `[]=` called on the result of `foo`...
...private def foo = puts "Hello" はパースされないことに注意してください。 17398

== コマンドラインオプション

* --disable-gems は"デバッグ専用"として明示的に宣言されました。デバッグ専用以外のコードでは使用しないでください...

NEWS for Ruby 2.3.0 (168.0)

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

...s.ruby-lang.org の issue を参照してください。

== 2.2.0 以降の変更

=== 言語仕様の変更

* frozen-string-literal プラグマ:
* 実験的な機能として fronzen-string-literal というプラグマが導入されました。
8976
* さらに --enable/--disab...
...ドで開いているときのみ効果があります。
11218
* `flags` オプションの追加。
this parameter is bitwise-ORed to oflags generated by normal mode argument.
11253
* IO#advise はもはや Errno::ENOSYS を起こしません。
サポートの有...
...修正を除く)

* ext/coverage/coverage.c
* Coverage.peek_result を追加。カバレッジツールを停止することなくカバレッジに関する情報を取得することができます。
https://bugs.ruby-lang.org/issues/10816

* Fiddle
* Fiddle::Function#call は G...

xmlrpc (166.0)

XML-RPC を扱うためのライブラリです。

...XML-RPC を扱うためのライブラリです。

このページは xmlrpc ライブラリのまとめのページであり、require 'xmlrpc' を実行しても
エラーになることに注意して下さい。

=== Author and Copyright

Copyright (C) 2001-2004 by Michael Neumann

Released und...
...er the same term of license as Ruby.

=== Overview

XMLRPC is a lightweight protocol that enables remote procedure calls over
HTTP. It is defined at http://www.xmlrpc.com.

XMLRPC allows you to create simple distributed computing solutions that span
computer languages. Its distinctive feature is i...
...ther of these.

=== Example

Try the following code. It calls a standard demonstration remote procedure.

require 'xmlrpc/client'
require 'pp'

server = XMLRPC::Client.new2("http://xmlrpc-c.sourceforge.net/api/sample.php")
result
= server.call("sample.sumAndDifference", 5, 3)
pp result

=...

NEWS for Ruby 2.5.0 (162.0)

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

...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.4.0 以降の変更

=== 言語仕様の変更

* トップレベルの定数参照を削除...
...hods: true)
//}
* Rubyで書かれたファイルをいくつか読み込んでから、Coverage.result を使って結果を取得することができます。
//emlist[][ruby]{
Coverage.result
#=> { "/path/to/file.rb"=>
# { :lines => [1, 2, 0, nil, ...],
# :branches =>
# { [...
...* Preserve time zone offset when deserializing times
https://github.com/ruby/psych/pull/316
* Remove deprecated method aliases for syck gem
https://github.com/ruby/psych/pull/312

* rbconfig
* RbConfig::LIMITS is added to provide the limits of C types.
This is...

net/imap (144.0)

このライブラリは Internet Message Access Protocol (IMAP) の クライアントライブラリです。2060 を元に 実装されています。

...て Mail/sent-mail から "Mail/sent-apr03" へ移動させる

require 'net/imap'

imap = Net::IMAP.new('mail.example.com')
imap.authenticate('LOGIN', 'joe_user', 'joes_password')
imap.select('Mail/sent-mail')
if not imap.list('Mail/', 'sent-apr03')
imap.create('Mail/sent-apr03')
en...
...Net::IMAP.new("imap.foo.net", "imap2")
imap.authenticate("cram-md5", "bar", "password")
imap.select("inbox")
fetch_thread = Thread.start { imap.fetch(1..-1, "UID") }
search_result = imap.search(["BODY", "hello"])
fetch_result = fetch_thread.value
imap.disconnect

とすると FETCH コ...
...ACCESS PROTOCOL - VERSION 4rev1",
RFC 2060, December 1996.

* [LANGUAGE-TAGS]
Alvestrand, H., "Tags for the Identification of
Languages", RFC 1766, March 1995.

* [MD5]
Myers, J., and M. Rose, "The Content-MD5 Header Field", RFC
1864, October 1995.

* [MIME-IMB]
Freed,...

絞り込み条件を変える

Array#combination(n) -> Enumerator (130.0)

サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。

...n of length 0
a.combination(5).to_a #=> [] : no combinations of length 5
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2, 3, 4]
result
= []
a.combination(2) {|e| result...
...<< e} # => [1,2,3,4]
result
#=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
//}

@see Array#permutation, Array#repeated_combination...

Array#combination(n) {|c| block } -> self (130.0)

サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。

...n of length 0
a.combination(5).to_a #=> [] : no combinations of length 5
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2, 3, 4]
result
= []
a.combination(2) {|e| result...
...<< e} # => [1,2,3,4]
result
#=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
//}

@see Array#permutation, Array#repeated_combination...
<< 1 2 3 > >>