るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. ipaddr to_i

検索結果

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

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

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

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

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

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

例えば WikiWord のような、SM::SimpleMarkup#add_word_pair、
SM::SimpleMarkup#add_html でフォーマットできないものに対して使用
します。

@param pattern 正規表...
...require 'rdoc/markup/simple_markup'
require 'rdoc/markup/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 (12301.0)

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

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

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

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

...した機能は Module#refine を使用せずに直
接 klass に対して変更を行う場合と異なり、限られた範囲のみ有効にできます。
そのため、既存の機能を局所的に修正したい場合などに用いる事ができます。

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

* 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 を実行した場合のみ
有効になります。

@param...
...機能を持つ無名のモジュールを返します。


//emlist[例][ruby]{
class C
def foo
puts "C#foo"
end
end

module M
refine C do
def foo
puts "C#foo in M"
end
end
end

x = C.new
x.foo # => "C#foo"

using M

x = C.new
x.foo # => "C#foo in M"
//}

@see main.using...

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

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

...変数(Fiber ローカル変数)と
異なり、Fiber を切り替えても同じ変数を返す事に注意してください。

例:

Thread.new {
Thread.current.thread_variable_set("foo", "bar") # スレッドローカル
Thread.current["foo"] = "bar" # Fiber ロー...
...}.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...

絞り込み条件を変える

1.6.8から1.8.0への変更点(まとめ) (3072.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への変更点(まとめ)/サポートプラットフォームの追加>))

...の変更点(まとめ)/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...
...ました

$stdin は、普通のグローバル変数となりました(STDINをリダイレクトする
動作はなくなりました)

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

$stdin にオブジ...
...while/until は、通常 nil を返しますが、break の引数により任意
の値を返すことができます。

: 多重代入 [change]

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

# # derived from sample/test.rb
# a = *[]; p a # special case
# def f; yie...

NEWS for Ruby 3.0.0 (306.0)

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

...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 behavior of Procs
accepting...
...tion warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

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

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesig...
...ed. It is a
type analysis tool for Ruby programs.
* Deprecation warnings are 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 be...

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

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

...ない場合は nil を返し
ます。self はあらかじめソートしておく必要があります。

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

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

find-minimum モード(...
...になる最初の要素を返すか、nil を返します。

//emlist[例][ruby]{
ary = [0, 4, 7, 10, 12]
ary.bsearch {|x| x >= 4 } # => 4
ary.bsearch {|x| x >= 6 } # => 7
ary.bsearch {|x| x >= -1 } # => 0
ary.bsearch {|x| x >= 100 } # => nil
//}

find-any モードは bsearch(3) のように...
...場合は、 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#ruby2_keywords(method_name, ...) -> nil (216.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.

...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 fi...
...al 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 thr...
...ethods.

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
before...

Array#bsearch -> Enumerator (184.0)

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

...ない場合は nil を返し
ます。self はあらかじめソートしておく必要があります。

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

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

find-minimum モード(...
...になる最初の要素を返すか、nil を返します。

//emlist[例][ruby]{
ary = [0, 4, 7, 10, 12]
ary.bsearch {|x| x >= 4 } # => 4
ary.bsearch {|x| x >= 6 } # => 7
ary.bsearch {|x| x >= -1 } # => 0
ary.bsearch {|x| x >= 100 } # => nil
//}

find-any モードは bsearch(3) のように...
...場合は、 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...

絞り込み条件を変える