るりまサーチ

最速Rubyリファレンスマニュアル検索!
38件ヒット [1-38件を表示] (0.015秒)

別のキーワード

  1. cgi element_init
  2. cgi/html element_init
  3. matrix element
  4. rss element
  5. element add_attribute

ライブラリ

クラス

キーワード

検索結果

REXML::Elements#size -> Integer (21113.0)

保持している要素の個数を返します。

...ml/document'
doc = REXML::Document.new '<a>sean<b/>elliott<b/>russell<b/></a>'
# doc.root は3つの要素と3つのテキストノードを持つため、6を返す
doc.root.size # => 6
# そのうち要素は3つであるため、以下は3を返す
doc.root.elements.size # => 3
//}...

NEWS for Ruby 3.0.0 (24.0)

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

...tor::ArithmeticSequence

//emlist[][ruby]{
dirty_data = ['--', 'data1', '--', 'data2', '--', 'data3']
dirty_data[(1..).step(2)] # take each second element
# => ["data1", "data2", "data3"]
//}

* Binding
* Binding#eval when called with one argument will use `"(eval)"` for `__FILE__` and `1` for...
...eql? are now defined and will return true for separate Proc instances if the procs were created from the same block. 14267
* Queue / SizedQueue
* Queue#pop, SizedQueue#push and related methods may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Ractor...
...zen. 8948 16377 15504

//emlist[][ruby]{
/foo/.frozen? #=> true
(42...).frozen? # => true
//}

* EXPERIMENTAL: Hash#each consistently yields a 2-element array. 12706
* Now `{ a: 1 }.each(&->(k, v) { })` raises an ArgumentError due to lambda's arity check.
* When writing to STDOUT redirected...

Array#transpose -> Array (12.0)

自身を行列と見立てて、行列の転置(行と列の入れ換え)を行いま す。転置した配列を生成して返します。空の配列に対しては空の配列を生 成して返します。

...[5,6]].transpose
# => [[1, 3, 5], [2, 4, 6]]

p [].transpose
# => []

p [1,2,3].transpose

# => -:1:in `transpose': cannot convert Fixnum into Array (TypeError)
# from -:1

p [[1,2],
[3,4,5],
[6,7]].transpose
# => -:3:in `transpose': element size differ (3 should be 2) (IndexError)
//}...

NEWS for Ruby 2.4.0 (12.0)

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

...-16BE/LE, UTF-32BE/LE, ISO-8859-1~16 をサポートしています。
Variations are available with options. 10085
* String.new(capacity: size) 12024

* StringIO
* StringIO#gets, StringIO#readline, StringIO#each_line, StringIO#readlines
省略可能なキーワード引数 cho...
...追加 12596

* readline
* Readline.quoting_detection_proc, Readline.quoting_detection_proc= を追加
12659

* rexml
* REXML::Element#[] : If String or Symbol is specified, attribute
value is returned. Otherwise, Nth child is returned. This is
backward compatible chang...