るりまサーチ

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

別のキーワード

  1. _builtin named_captures
  2. regexp named_captures
  3. matchdata named_captures
  4. ec named_curve
  5. openssl named_curve

ライブラリ

クラス

検索結果

Regexp#named_captures -> { String => [Integer] } (18220.0)

正規表現に含まれる名前付きキャプチャ(named capture)の情報を Hash で返します。

...のリストを返します。

//emlist[例][ruby]{
/(?<foo>.)(?<bar>.)/.named_captures
# => {"foo"=>[1], "bar"=>[2]}

/(?<foo>.)(?<foo>.)/.named_captures
# => {"foo"=>[1, 2]}

# 名前付きキャプチャを持たないときは空の Hash を返します。
/(.)(.)/.named_captures
# => {}
//}...

NEWS for Ruby 2.4.0 (108.0)

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

...加 12512

* Integer
* Fixnum と Bignum は Integer に統合されました 12005
* Integer#ceil, Integer#floor, Integer#truncate は
Integer
#round と同じように省略可能な桁を指定する引数を受け付けるようになりました 12245
* Integer#digits を追...
...加。 12447
位置記法のために各桁を展開するためのメソッドです。
* Integer#round は half というキーワード引数を受け付けるようになりました。
half には :even, :up, :down が指定可能です。 12548 12958 12953

* IO
* IO#gets...
...Kernel#clone は freeze というキーワード引数を受け付けるようになりました。
12300

* MatchData
* MatchData#named_captures を追加 11999
* MatchData#values_at は named captures をサポートするようになりました 9179

* Module
* Module#refin...