るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

モジュール

検索結果

<< 1 2 > >>

RDoc::Parser::Ruby::NORMAL -> "::" (27201.0)

RDoc::NormalClass type

...RDoc::NormalClass type...

Module#ruby2_keywords(method_name, ...) -> nil (18494.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

...he given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword arguments, the...
...ment is marked with a special
flag such that if it is the final element of a normal argument splat to
another method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passed through the met...
...er methods.

This should only be used for methods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.

This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
be...

Proc#ruby2_keywords -> proc (18494.0)

Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.

...rks the proc as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked wit...
...oes not include explicit keywords or a keyword splat, the
final element is interpreted as keywords. In other words, keywords will
be passed through the proc to other methods.

This should only be used for procs that delegate keywords to another
method, and only for backwards compatibility with Ruby...
...versions before
2.7.

This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the proc responds to this method before calling
it. Also, be aware that if this method is removed, the behavior of the...

REXML::Text.unnormalize(string, doctype = nil, filter = nil, illegal = nil) -> String (15312.0)

string を非正規化(すべての entity をアンエスケープ)したものを 返します。

...(すべての entity をアンエスケープ)したものを
返します。

filter でアンエスケープしない実体の実体名を文字列配列で指定します。

@param string 非正規化する文字列
@param doctype DTD(REXML::DocType オブジェクト)
@param filter アンエス...
...ケープしない実体の実体名(文字列配列)
@param illegal 内部用。使わないでください。

//emlist[][ruby]{
require 'rexml/text'
REXML::Text.unnormalize("&amp; &foobar; &lt;") # => "& &foobar; <"
REXML::Text.unnormalize("&lt; &gt;", nil, ["lt"]) # => "&lt; >"
//}...

NEWS for Ruby 3.0.0 (12696.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...の変更

* Keyword arguments 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 autosplattin...
...hes the behavior of Procs
accepting a single rest argument and no keywords.
16166

//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}

pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]

pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Argume...

絞り込み条件を変える

String#unicode_normalize(form = :nfc) -> String (12378.0)

self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し た文字列を返します。

...self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し
た文字列を返します。

@param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定しま
す。省略した場合は :nfc になります。

@raise Encoding::Comp...
...lityError self が Unicode 文字列ではない場合
に発生します。

このメソッドでの "Unicode 文字列" とは、UTF-8、UTF-16BE/LE
UTF-32BE/LE だけではなく GB18030、UCS_2BE、and UCS_4BE を含みます。

また、self が UTF-8...
...は一度 UTF-8 に変
換してから正規化されるため、UTF-8 よりも遅くなっています。

//emlist[例][ruby]{
"a\u0300".unicode_normalize # => 'à' ("\u00E0" と同じ)
"a\u0300".unicode_normalize(:nfc) # => 'à' ("\u00E0" と同じ)
"\u00E0".unicode_normalize(:nfd) # =...

NEWS for Ruby 2.3.0 (12342.0)

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

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

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

== 2.2.0 以降の変更

=== 言語仕様の変更

* frozen-string-literal プラグマ:
* 実験的な機能として fronzen-string-literal というプラグマが導入されました。
8...
...rameter is bitwise-ORed to oflags generated by normal mode argument.
11253
* IO#advise はもはや Errno::ENOSYS を起こしません。
サポートの有無を実行時ではなくビルド時に検出するためです。
11806

* Kernel
* Kernel.#loop は StopIterat...

String#unicode_normalized?(form = :nfc) -> bool (12336.0)

self が引数 form で指定された正規化形式で Unicode 正規化された文字列か どうかを返します。

...self が引数 form で指定された正規化形式で Unicode 正規化された文字列か
どうかを返します。

@param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定しま
す。省略した場合は :nfc になります。

@raise Encoding::Co...
...yError self が Unicode 文字列ではない場合
に発生します。

//emlist[例][ruby]{
"a\u0300".unicode_normalized? # => false
"a\u0300".unicode_normalized?(:nfd) # => true
"\u00E0".unicode_normalized? # => true
"\u00E0".unicode_normalize...
...d?(:nfd) # => false
"\xE0".force_encoding('ISO-8859-1').unicode_normalized?
# => Encoding::CompatibilityError raised
//}

@see String#unicode_normalize, String#unicode_normalize!...

String#unicode_normalize!(form = :nfc) -> self (12318.0)

self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し た文字列に置き換えます。

...self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し
た文字列に置き換えます。

(gsub!などと異なり)変換が行なわれなくても self を返します。

@param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定し...
...す。

@raise Encoding::CompatibilityError self が Unicode 文字列ではない場合
に発生します。

//emlist[例][ruby]{
text = "a\u0300"
text.unicode_normalize!(:nfc)
text == "\u00E0" # => true
text.unicode_normalize!(:nfd)
text == "a\u03...
...00" # => true
//}

@see String#unicode_normalize, String#unicode_normalized?...

Vector#normalize -> Vector (12312.0)

自身を Vector#norm で正規化したベクトルを返します。

...自身を Vector#norm で正規化したベクトルを返します。

@raise Vector::ZeroVectorError ベクトルが0である場合に発生します。

//emlist[例][ruby]{
require 'matrix'
v = Vector[2, 6, 9].normalize
# => Vector[0.18181818181818182, 0.5454545454545454, 0.8181818181818182]
v....
...norm # => 1.0
//}

@see Vector#norm...

絞り込み条件を変える

IO#advise(advice, offset=0, len=0) -> nil (6254.0)

posix_fadvise(2) を呼びだし、 ファイルへのアクセスパターンをOSに知らせます。

...posix_fadvise(2) を呼びだし、
ファイルへのアクセスパターンをOSに知らせます。

advice には以下のいずれかのシンボルを指定します。
* :normal - デフォルト
* :sequential - データは前から順にアクセスされる
* :random - データ...
...ise Errno::ESPIPE ファイルデスクリプタが FIFO か pipe を指している
場合に発生する例外(Linux はこの場合には Errno::EINVAL を発生する)
@raise RangeError offset,lenが有効範囲から出ている場合に発生する例外

//emlist[例][ruby]{
File.open(...
..."testfile") { |f| p f.advise(:sequential) } # => nil
//}...

Enumerable#max_by -> Enumerator (3266.0)

各要素を順番にブロックに渡して実行し、 その評価結果を <=> で比較して、 最大であった値に対応する元の要素、もしくは最大の n 要素が降順で入った配列を返します。

...不定です。

E
numerable#max と Enumerable#max_by の
違いは Enumerable#sort と Enumerable#sort_by の違いと同じです。

ブロックを省略した場合は Enumerator を返します。

@param n 取得する要素数。

//emlist[例][ruby]{
a = %w(albatross dog horse)
a.max_by...
...=> #<Enumerator: ["albatross", "dog", "horse"]:max_by>
a.max_by { |x| x.length } # => "albatross"
//}

//emlist[例][ruby]{
a = %w[albatross dog horse]
a.max_by(2) # => #<Enumerator: ["albatross", "dog", "horse"]:max_by(2)>
a.max_by(2) {|x| x.length } # => ["albatross", "horse"]
//...
.../emlist[例: enum.max_by(n)は、重み付きランダムサンプリングを実装するために使用できます。次の実装例は、Enumerable#wsampleを使用します。][ruby]{
module Enumerable
# weighted random sampling.
#
# Pavlos S. Efraimidis, Paul G. Spirakis
# Weighted...
<< 1 2 > >>