るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

検索結果

<< 1 2 > >>

RDoc::Options::SPECIAL -> [String] (18217.0)

--write-options を指定した際に .rdoc_options ファイルに保存されないオプ ションの一覧を返します。

...
-
-write-options を指定した際に .rdoc_options ファイルに保存されないオプ
ションの一覧を返します。...

RDoc::Markup#add_special(pattern, name) -> () (6249.0)

pattern で指定した正規表現にマッチする文字列をフォーマットの対象にしま す。

...kup/simple_markup/to_html'

class WikiHtml < SM::ToHtml
def handle_special_WIKIWORD(special)
"<font color=red>" + special.text + "</font>"
end
end

m = SM::SimpleMarkup.new
m.add_special(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD)

h = WikiHtml.new
puts m.convert(input_string, h)...
...変換時に実際にフォーマットを行うには SM::ToHtml#accept_special_<name で指定した名前>
のように、フォーマッタ側でも操作を行う必要があります。...

Rake::FileList::SPECIAL_RETURN -> Array (6201.0)

Array のインスタンスを返すので委譲した後にラップする必要があるメソッドのリストです。

Array のインスタンスを返すので委譲した後にラップする必要があるメソッドのリストです。

1.6.8から1.8.0への変更点(まとめ) (2532.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...作はなくなりました)

$defout や $deferr に代入を行うと警告がでます。
(注:1.6 に $deferr はありません)
((<ruby-dev:20961>))

$stdin にオブジェクトを代入すると標準入力からの入力メソッド(gets 等)
はそのオブジェクトにメソ...
...: 警告を出力しない (-W0 新しい警告レベル)
* false: 重要な警告のみ出力 (-W1 デフォルト)
* true: すべての警告を出力する (-W2 or -W or -v or -w or --verbose)

追加された -W オプションは $VERBOSE = nil の指定(-W0)を可能にします。

:...
...重代入 [change]

多重代入の規則を見直しました。

# # derived from sample/test.rb
# a = *[]; p a # special case
# def f; yield; end; f {|a| p a} # add (warning)
# def r; return; end; a = r(); p a
# a = nil; p a
# def f; yield nil; e...

NEWS for Ruby 3.0.0 (300.0)

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

...mlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesigned. [EXPERIMENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in...
...> 0

{b: 0, c: 1} => {b:}
p b #=> 0
//}

//emlist{
# version 3.0
0 in 1 #=> false

# version 2.7
0 in 1 #=> raise NoMatchingPatternError
//}

* Find-pattern is added. [EXPERIMENTAL]
16828

//emlist{
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
in [*pre, String => x, String => y, *post]
p pr...
...e no longer shown by default (since Ruby 2.7.2).
Turn them on with `-W:deprecated` (or with `-w` to show other warnings too).
16345
* `$SAFE` and `$KCODE` are now normal global variables with no special behavior.
C-API methods related to `$SAFE` have been removed.
16131 17136
* y...

絞り込み条件を変える

Array#bsearch -> Enumerator (166.0)

ブロックの評価結果で範囲内の各要素の判定を行い、条件を満たす値を二分探 索(計算量は O(log n))で検索します。要素が見つからない場合は nil を返し ます。self はあらかじめソートしておく必要があります。

...本メソッドはブロックを評価した結果により以下のいずれかのモードで動作し
ます。

* find-minimum モード
* find-any モード

find-minimum モード(特に理由がない限りはこのモードを使う方がいいでしょ
う)では、条件判定の結...
...y.bsearch {|x| x >= -1 } # => 0
ary.bsearch {|x| x >= 100 } # => nil
//}

find-any モードは bsearch(3) のように動作します。ブロックは真偽値
ではなく、以下のような数値を返す必要があります。求める要素が配列の i 番目
から j-1 番目までに...
...場合は、 Enumerator のインスタンスを返します。

@raise TypeError ブロックの評価結果が true、false、nil、数値以外であっ
た場合に発生します。

@see Range#bsearch, https://magazine.rubyist.net/articles/0041/0041-200Special-note.html...
...merator のインスタンスを返します。

@raise TypeError ブロックの評価結果が true、false、nil、数値以外であっ
た場合に発生します。

@see Array#bsearch_index, Range#bsearch, https://magazine.rubyist.net/articles/0041/0041-200Special-note.html...

Array#bsearch { |x| ... } -> object | nil (166.0)

ブロックの評価結果で範囲内の各要素の判定を行い、条件を満たす値を二分探 索(計算量は O(log n))で検索します。要素が見つからない場合は nil を返し ます。self はあらかじめソートしておく必要があります。

...本メソッドはブロックを評価した結果により以下のいずれかのモードで動作し
ます。

* find-minimum モード
* find-any モード

find-minimum モード(特に理由がない限りはこのモードを使う方がいいでしょ
う)では、条件判定の結...
...y.bsearch {|x| x >= -1 } # => 0
ary.bsearch {|x| x >= 100 } # => nil
//}

find-any モードは bsearch(3) のように動作します。ブロックは真偽値
ではなく、以下のような数値を返す必要があります。求める要素が配列の i 番目
から j-1 番目までに...
...場合は、 Enumerator のインスタンスを返します。

@raise TypeError ブロックの評価結果が true、false、nil、数値以外であっ
た場合に発生します。

@see Range#bsearch, https://magazine.rubyist.net/articles/0041/0041-200Special-note.html...
...merator のインスタンスを返します。

@raise TypeError ブロックの評価結果が true、false、nil、数値以外であっ
た場合に発生します。

@see Array#bsearch_index, Range#bsearch, https://magazine.rubyist.net/articles/0041/0041-200Special-note.html...

Module#refine(klass) { ... } -> Module (124.0)

引数 klass で指定したクラスまたはモジュールだけに対して、ブロックで指定した機能を提供で きるモジュールを定義します。定義した機能は Module#refine を使用せずに直 接 klass に対して変更を行う場合と異なり、限られた範囲のみ有効にできます。 そのため、既存の機能を局所的に修正したい場合などに用いる事ができます。

...nements 機能の詳細については以下を参照してください。

* https://magazine.rubyist.net/articles/0041/0041-200Special-refinement.html
* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html

定義した機能は main.using, Module#using を実行した場合のみ...

Thread#thread_variable_get(key) -> object | nil (118.0)

引数 key で指定した名前のスレッドローカル変数を返します。

...}.resume
}.join.value # => ['bar', nil]

この例の "bar" は Thread#thread_variable_get により得られ
た値で、nil はThread#[] により得られた値です。

@see Thread#thread_variable_set, Thread#[]

@see https://magazine.rubyist.net/articles/0041/0041-200Special-note.html...

Module#ruby2_keywords(method_name, ...) -> nil (116.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.

...ywords 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
keywo...

絞り込み条件を変える

Proc#ruby2_keywords -> proc (116.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.

...t 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 keywo...
...so, be aware that if this method is removed, the behavior of the
proc will change so that it does not pass through keywords.

//emlist[][ruby]{
module Mod
foo = ->(meth, *args, &block) do
send(:"do_#{meth}", *args, &block)
end
foo.ruby2_keywords if foo.respond_to?(:ruby2_keywords)
end
//}...
<< 1 2 > >>