種類
- インスタンスメソッド (38)
- 文書 (35)
クラス
- Array (16)
-
JSON
:: State (22)
キーワード
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 3
. 1 . 0 (3) -
buffer
_ initial _ length (11) -
buffer
_ initial _ length= (11) -
ruby 1
. 8 . 4 feature (11) - sum (16)
検索結果
先頭5件
-
JSON
:: State # buffer _ initial _ length=(length) (12350.0) -
This sets the initial length of the buffer to length, if length > 0, otherwise its value isn't changed.
...This sets the initial length of the buffer to length, if length > 0,
otherwise its value isn't changed.... -
JSON
:: State # buffer _ initial _ length -> Integer (12217.0) -
This integer returns the current initial length of the buffer.
...This integer returns the current initial length of the buffer.... -
Array
# sum(init=0) -> object (136.0) -
要素の合計を返します。例えば [e1, e2, e3].sum は init + e1 + e2 + e3 を返します。
...素の合計を返します。例えば [e1, e2, e3].sum は init + e1 + e2 + e3 を返します。
ブロックが与えられた場合、加算する前に各要素にブロックが適用されます。
配列が空の場合、initを返します。
//emlist[例][ruby]{
[].sum......#=> TypeError
//}
配列の平均値は以下のように求められます。
//emlist[例][ruby]{
mean = ary.sum(0.0) / ary.length
//}
init 引数を明示的に指名すると数値以外のオブジェクトにも使えます。
//emlist[例][ruby]{
["a", "b", "c"].sum("")... -
Array
# sum(init=0) {|e| expr } -> object (136.0) -
要素の合計を返します。例えば [e1, e2, e3].sum は init + e1 + e2 + e3 を返します。
...素の合計を返します。例えば [e1, e2, e3].sum は init + e1 + e2 + e3 を返します。
ブロックが与えられた場合、加算する前に各要素にブロックが適用されます。
配列が空の場合、initを返します。
//emlist[例][ruby]{
[].sum......#=> TypeError
//}
配列の平均値は以下のように求められます。
//emlist[例][ruby]{
mean = ary.sum(0.0) / ary.length
//}
init 引数を明示的に指名すると数値以外のオブジェクトにも使えます。
//emlist[例][ruby]{
["a", "b", "c"].sum("")... -
NEWS for Ruby 2
. 1 . 0 (24.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...す。
* GC
* 改良: RGenGC として知られている世代別GCが導入しました
* 追加した環境変数
* RUBY_GC_HEAP_INIT_SLOTS
* RUBY_GC_HEAP_FREE_SLOTS
* RUBY_GC_HEAP_GROWTH_FACTOR
* RUBY_GC_HEAP_GROWTH_MAX_SLOTS
* RUBY_GC_MALLOC_LIMIT_MAX......Y_GC_HEAP_FREE_SLOTS を代わりに使います)
* RUBY_HEAP_MIN_SLOTS (RUBY_GC_HEAP_INIT_SLOTS を代わりに使います)
* Integer
* 追加: Fixnum#bit_length
* 追加: Bignum#bit_length
* Bignum の性能向上
* GMP をいくつかの操作で使えるときは使......on_method)
* Module
* 追加: Module#using, which activates refinements of the specified module only
in the current class or module definition.
* 追加: Module#singleton_class? レシーバーが特異クラスであれば true を返します。
レシーバーが通常の... -
ruby 1
. 8 . 4 feature (24.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...* ((<ruby 1.8.4 feature/"Ruby/Tk">))
* ((<ruby 1.8.4 feature/REXML [compat]>))
* ((<ruby 1.8.4 feature/TCPSocket#initialize [bug]>))
* ((<ruby 1.8.4 feature/TCPServer#initialize [bug]>))
* ((<ruby 1.8.4 feature/"optparse">))
* ((<ruby 1.8.4 feature/"find">))
* ((<ruby 1.8.4 feature/Ic......しました。((<ruby-dev:27964>))
module Foo
def initialize
super
end
end
class Bar
include Foo
def initialize
Foo.instance_method(:initialize).bind(self).call
end
end
Bar.new......。
: Array#fill [bug]
#Tue Nov 15 14:39:16 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * array.c (rb_ary_fill): should adjust array length correctly when
# an array is expanded in the fill process. [ruby-core:06625]
Arrayに対してfillとpopを繰り返すとSEGVす... -
NEWS for Ruby 2
. 2 . 0 (12.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...as a
block, and the number of yielded arguments does not match the formal
arguments of the lambda, if just an array is yielded and its length
matches.
* Process
* Process.spawn のようなプロセスを起動するようなメソッドは [:out, :err]
からリダ......ttyprint
* PrettyPrint#first? は削除しました。
* lib/minitest/*.rb
* mintest 5 と衝突するので削除しました。9711
* lib/test/**/*.rb
* minitest 5 と衝突するので削除しました。minitest 4 の単なるラッパーだった。9711
* uri
* 3986......ement.
* rb_exec_arg_addopt : internal function. no replacement.
* rb_exec_arg_fixup : internal function. no replacement.
* rb_exec_arg_init : internal function. no replacement.
* rb_exec_err : internal function. no replacement.
* rb_fork : internal function. no replacement.... -
NEWS for Ruby 3
. 1 . 0 (12.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...除されます。 18148
* MatchData
* 新規メソッド
* MatchData#match が追加されました。 18172
* MatchData#match_length が追加されました。 18172
* Method / UnboundMethod
* 新規メソッド
* Method#public?, Method#private?, Method#protected?,......することができます。 17795
* Struct
* 新規メソッド
* StructClass#keyword_init? が追加されました。 18008
* 変更されたメソッド
* Struct#initialize はキーワード引数のみを渡すと警告されるようになりました。ハッシュ.......0
* tmpdir 0.1.2
* un 0.2.0
* uri 0.11.0
* yaml 0.2.0
* zlib 2.1.1
* 以下のbundled gemsが更新されました。
* minitest 5.15.0
* power_assert 2.0.1
* rake 13.0.6
* test-unit 3.5.3
* rexml 3.2.5
* rbs 2.0.0
* typeprof 0.21.1
* 以下のdef...