るりまサーチ

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

別のキーワード

  1. _builtin nil?
  2. nilclass nil?
  3. object nil?
  4. object nil
  5. _builtin nil

ライブラリ

クラス

モジュール

検索結果

Abbrev.#abbrev(words, pattern = nil) -> Hash (35338.0)

文字列の配列から一意に決まる短縮形を計算し、 短縮形をキー、元の文字列を値とするハッシュを返します。

...attern Regexp か String を指定します。

@return 短縮形をキー、元の文字列を値とするハッシュを返します。

require 'abbrev'

# words に同じ文字列が含まれている場合は
# 以下のようにその文字列しか返しません。
pp Abbrev.abbrev...
...適切に処理します。
pp Abbrev.abbrev(['ru by']).sort
# => [["r", "ru by"],
# ["ru", "ru by"],
# ["ru ", "ru by"],
# ["ru b", "ru by"],
# ["ru by", "ru by"]]
# sort していない例
p %w[ruby rubyist].abbrev
#=> {"ruby" => "ruby",...

Array#abbrev(pattern = nil) -> Hash (26338.0)

self が文字列の配列の場合、self から一意に決まる短縮形を計算し、 短縮形をキー、元の文字列を値とするハッシュを返します。

...

Abbrev
.#abbrev(self, pattern) と同じです。

@param pattern Regexp か String を指定します。


require 'abbrev'
p %w[ruby rubyist].abbrev
#=> {"ruby" => "ruby",
# "rubyi" => "rubyist",
# "rubyis" => "rubyist",
# "rubyist" => "rubyist"}

@see Abbrev.#abbrev...

NEWS for Ruby 3.0.0 (42.0)

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

...s are now separated from positional 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 behavi...
...ll be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modify Regexp.last_match. 17030
* Requiring 'open-uri' no longe...
...SortedSet has been removed for dependency and performance reasons.

== Stdlib compatibility issues

* Default gems
* The following libraries are promoted to default gems from stdlib.
* English
* abbrev
* base64
* drb
* debug
* erb
* find
* net-ft...