るりまサーチ

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

別のキーワード

  1. fiddle ref
  2. pointer ref
  3. entity ref
  4. _builtin _id2ref
  5. rexml/document ref

種類

ライブラリ

モジュール

検索結果

Find.#find(*dirs) -> Enumerator (35166.0)

find(1) のように dir 配下のすべてのファイルや ディレクトリを一つずつ引数 file に渡してブロックを実行します。

...
find
(1) のように dir 配下のすべてのファイルや
ディレクトリを一つずつ引数 file に渡してブロックを実行します。

ディレクトリのシンボリックリンクは辿りません。
また file に渡される順序は不定です。

ブロックを省略...
...クトリを一つ以上指定します。


例:

require 'find'

Find
.find('/tmp') {|f|
Find
.prune if f == "/tmp/bar"
...
}

あるディレクトリ配下の探索を省略したい場合は上記のように、
Find
.#prune を使用します。この例では "/tmp/bar"
配下の...
...ファイルやディレクトリを探索しません。prune の代わりに
d:spec/control#next を使用した場合、"/tmp/bar" 自体をスキップする
だけで、その配下の探索は続行されます。

@see find(1), Find.#prune...

Find.#find(*dirs) {|file| ... } -> nil (35166.0)

find(1) のように dir 配下のすべてのファイルや ディレクトリを一つずつ引数 file に渡してブロックを実行します。

...
find
(1) のように dir 配下のすべてのファイルや
ディレクトリを一つずつ引数 file に渡してブロックを実行します。

ディレクトリのシンボリックリンクは辿りません。
また file に渡される順序は不定です。

ブロックを省略...
...クトリを一つ以上指定します。


例:

require 'find'

Find
.find('/tmp') {|f|
Find
.prune if f == "/tmp/bar"
...
}

あるディレクトリ配下の探索を省略したい場合は上記のように、
Find
.#prune を使用します。この例では "/tmp/bar"
配下の...
...ファイルやディレクトリを探索しません。prune の代わりに
d:spec/control#next を使用した場合、"/tmp/bar" 自体をスキップする
だけで、その配下の探索は続行されます。

@see find(1), Find.#prune...

Find.#find(*dirs, ignore_error: true) -> Enumerator (35166.0)

find(1) のように dir 配下のすべてのファイルや ディレクトリを一つずつ引数 file に渡してブロックを実行します。

...
find
(1) のように dir 配下のすべてのファイルや
ディレクトリを一つずつ引数 file に渡してブロックを実行します。

ディレクトリのシンボリックリンクは辿りません。
また file に渡される順序は不定です。

ブロックを省略...
...無視するかどうかを指定します。

例:

require 'find'

Find
.find('/tmp') {|f|
Find
.prune if f == "/tmp/bar"
...
}

あるディレクトリ配下の探索を省略したい場合は上記のように、
Find
.#prune を使用します。この例では "/tmp/bar"
配下...
...のファイルやディレクトリを探索しません。prune の代わりに
d:spec/control#next を使用した場合、"/tmp/bar" 自体をスキップする
だけで、その配下の探索は続行されます。

@see find(1), Find.#prune...

Find.#find(*dirs, ignore_error: true) {|file| ... } -> nil (35166.0)

find(1) のように dir 配下のすべてのファイルや ディレクトリを一つずつ引数 file に渡してブロックを実行します。

...
find
(1) のように dir 配下のすべてのファイルや
ディレクトリを一つずつ引数 file に渡してブロックを実行します。

ディレクトリのシンボリックリンクは辿りません。
また file に渡される順序は不定です。

ブロックを省略...
...無視するかどうかを指定します。

例:

require 'find'

Find
.find('/tmp') {|f|
Find
.prune if f == "/tmp/bar"
...
}

あるディレクトリ配下の探索を省略したい場合は上記のように、
Find
.#prune を使用します。この例では "/tmp/bar"
配下...
...のファイルやディレクトリを探索しません。prune の代わりに
d:spec/control#next を使用した場合、"/tmp/bar" 自体をスキップする
だけで、その配下の探索は続行されます。

@see find(1), Find.#prune...

パターンマッチ (206.0)

パターンマッチ * patterns * variable_binding * variable_pinning * matching_non_primitive_objects * guard_clauses * current_feature_status * pattern_syntax * some_undefined_behavior_examples

...not matched"
end
#=> "matched"
//}

//emlist[][ruby]{
case {a: 1, b: 2, c: 3}
in a: Integer
"matched"
else
"not matched"
end
#=> "matched"
//}




Find
パターン は Array パターン に似ていますが、オブジェクトの一部の要素がマッチしていることを検査できま...
...ススメしません。

===[a:variable_pinning] 変数のピン留め

既に存在しているローカル変数は、サブパターン(Array/Find/Hashパターン構文の <subpattern> の部分) として変数の値をそのまま使うことができません。(これは、変数への束...
...パターン: 『[<subpattern>, <subpattern>, <subpattern>, ...]』 (「Array パターン」)
* Find パターン: 『[*variable, <subpattern>, <subpattern>, <subpattern>, ..., *variable]』 (「Find パターン」)
* Hash パターン: 『{key: <subpattern>, key: <subpattern>, ...}』 (「Has...
...(「As パターン」, 「Variable パターン」)

Array/Find/Hash パターンの中に 『<subpattern>』 と書かれている場所では任意のパターンをネストさせることができます。

Array パターン と Find パターン は配列か deconstruct メソッド(後述)...
...

//emlist{
[1, 2] => a, b
//}

//emlist{
[1, 2] in a, b
//}

//emlist{
{a: 1, b: 2, c: 3} => a:
//}


//emlist{
{a: 1, b: 2, c: 3} in a:
//}




Find
パターン は Array パターン に似ていますが、オブジェクトの一部の要素がマッチしていることを検査できま...

絞り込み条件を変える

NEWS for Ruby 3.0.0 (30.0)

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

...#=> 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...
...`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+analysis] foundation is
in...
...r hooks in a non-blocking context. 16786
* Ractor
* New class added to enable parallel execution. See rdoc-ref:ractor.md for more details.
* Random
* `Random::DEFAULT` now refers to the `Random` class instead of being a `Random` instance, so it can work with `Ractor`. 17322
* `Random...

ruby 1.6 feature (12.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...-:3: warning: ambiguous first argument; make sure
ruby 1.6.7 (2002-07-30) [i586-linux]
"\\#"
nil

: 2002-04-29: rb_find_file()

$SAFE >= 4 で、絶対パス指定でない場合、SecurityError 例外が発生する
ようになりました。

: 2002-04-26: Reg...
...ameError)
from -:2
ruby 1.6.7 (2002-03-01) [i586-linux]

=> ruby 1.6.7 (2002-03-15) [i586-linux]

: 2002-03-13 ((<getopts>))

ref
ine. ((<ruby-dev:16193>)), ((<ruby-dev:16213>))

: 2002-03-11 正規表現中の 8 進コード

正規表現中の \nnn による 8 進記法...
...$prefix/lib/ruby/site_ruby/$ver/foo.rb
$prefix/lib/ruby/site_ruby/$ver/foo.so
$prefix/lib/ruby/site_ruby/$ver/$arch/foo.rb
$prefix/lib/ruby/site_ruby/$ver/$arch/foo.so
$prefix/lib/ruby/site_ruby/foo.rb
$prefix/lib/ruby/site_ruby/foo.so
$prefix/lib/ruby/$ver/foo.rb
$prefix...