613件ヒット
[1-100件を表示]
(0.033秒)
ライブラリ
- ビルトイン (416)
- fileutils (67)
-
rubygems
/ dependency _ installer (24) -
win32
/ registry (48)
クラス
-
Encoding
:: Converter (48) -
Enumerator
:: Lazy (332) -
Gem
:: DependencyInstaller (24)
モジュール
- Enumerable (12)
- FileUtils (67)
-
Win32
:: Registry :: Constants (48)
キーワード
-
DEFAULT
_ OPTIONS (12) - InvalidByteSequenceError (12)
- Lazy (12)
-
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 1 . 0 (4) -
REG
_ FORCE _ RESTORE (12) -
REG
_ NO _ LAZY _ FLUSH (12) -
REG
_ REFRESH _ HIVE (12) -
REG
_ WHOLE _ HIVE _ VOLATILE (12) - chunk (24)
- collect (12)
-
collect
_ concat (12) -
cp
_ lr (7) - drop (12)
-
drop
_ while (12) - filter (7)
-
filter
_ map (6) -
find
_ all (12) -
flat
_ map (12) - grep (12)
-
grep
_ v (10) - lazy (12)
- map (12)
- new (24)
-
primitive
_ convert (48) -
rb
_ gc _ force _ recycle (12) - reject (12)
-
remove
_ entry (12) -
remove
_ entry _ secure (12) -
ruby 1
. 8 . 2 feature (12) -
rubygems
/ commands / install _ command (12) -
rubygems
/ commands / uninstall _ command (12) - select (12)
-
slice
_ after (22) -
slice
_ before (36) -
slice
_ when (11) - symlink (12)
- take (12)
-
take
_ while (24) -
with
_ index (12) - zip (24)
検索結果
先頭5件
-
Enumerator
:: Lazy # force(*args) -> [object] (21107.0) -
全ての要素を含む配列を返します。Lazy から実際に値を取り出すのに使います。
...ての要素を含む配列を返します。Lazy から実際に値を取り出すのに使います。
Enumerable#to_a のエイリアスです。
//emlist[例][ruby]{
1.step.lazy.take(10).force
# => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
1.step.lazy.take(10).to_a
# => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]... -
void rb
_ gc _ force _ recycle(VALUE p) (12200.0) -
p を強制的に GC します。
p を強制的に GC します。 -
Win32
:: Registry :: Constants :: REG _ FORCE _ RESTORE (9101.0) -
@todo
@todo -
Win32
:: Registry :: Constants :: REG _ NO _ LAZY _ FLUSH (9101.0) -
@todo
@todo -
Enumerable
# lazy -> Enumerator :: Lazy (6242.0) -
自身を lazy な Enumerator に変換したものを返します。
...自身を lazy な Enumerator に変換したものを返します。
この Enumerator は、以下のメソッドが遅延評価を行う (つまり、配列ではな
くEnumeratorを返す) ように再定義されています。
* map/collect
* flat_map/collect_concat
* select/find_all
*......みlazy)
* cycle (※一貫性のため、ブロックを渡さないケースのみlazy)
以下はピタゴラス数 (a**2 + b**2 = c**2 を満たす自然数 a, b, c の組) を
列挙するプログラムです。
//emlist[例][ruby]{
def pythagorean_triples
(1..Float::INFINITY).lazy.flat_ma......flat_map {|x|
(x..z).select {|y|
x**2 + y**2 == z**2
}.map {|y|
[x, y, z]
}
}
}
end
# 最初の10個のピタゴラス数を表示する
p pythagorean_triples.take(10).force # takeはlazyなので、forceが必要です
p pythagorean_triples.first(10) # f... -
FileUtils
. # remove _ entry(path , force = false) -> () (6207.0) -
ファイル path を削除します。path がディレクトリなら再帰的に削除します。
...e_entry_secure の項を参照してください。
@param path 削除するパス。
@param force 真のときは削除中に発生した StandardError を無視します。
//emlist[][ruby]{
require 'fileutils'
FileUtils.remove_entry '/tmp/ruby.tmp.08883'
//}
@see FileUtils.#remove_entry_secur... -
FileUtils
. # remove _ entry _ secure(path , force = false) -> () (6207.0) -
ファイル path を削除します。path がディレクトリなら再帰的に削除します。
...FileUtils.#rm_r および FileUtils.#remove_entry には
TOCTTOU (time-of-check to time-of-use)脆弱性が存在します。
このメソッドはそれを防ぐために新設されました。
FileUtils.#rm_r および FileUtils.#remove_entry は以下の条件が
満たされるときにはセ......リンクを持つ
この脆弱性を防ぐため、remove_entry_secure は削除前に path 以下の
ディレクトリのオーナーとパーミッションを変更し、上記の条件を回避します。
ただし remove_entry_secure は親ディレクトリが以下の条件を満たすこ....../var が全ユーザから書き込み可能であってはなりません。
この条件が満たされない場合 remove_entry_secure は安全ではありません。
@param path 削除するパス。
@param force 真のときは削除中に発生した StandardError を無視します。... -
rubygems
/ commands / install _ command (6018.0) -
Gem パッケージをローカルリポジトリにインストールするためのライブラリです。
...-E, --[no-]env-shebang インストールするスクリプトの shebang line を書き換えます(/usr/bin/env)
-f, --[no-]force 依存関係のチェックをバイパスして強制的にインストールします
-t, --[no-]test イ......プラットフォーム上では無効です
-P, --trust-policy POLICY Specify gem trust policy
--ignore-dependencies 依存している Gem パッケージをインストールしません
-y, --include-dependencies 依存している Gem パッケージ......をインストールします
--[no-]format-executable Make installed executable names match ruby.
If ruby is ruby18, foo_exec will be
foo_exec18
Local/Remote Options:
-l, --local... -
Encoding
:: InvalidByteSequenceError (6012.0) -
文字列がそのエンコーディングにおいて不正なバイト列である場合に発生 する例外。
...である場合に発生
する例外。
通常エンコーディング変換時に発生します。
//emlist[例][ruby]{
"\x82\xa0".force_encoding("cp932").encode("UTF-8")
#=> "あ"
"\x82\xa0".force_encoding("EUC-JP").encode("UTF-8")
#=> Encoding::InvalidByteSequenceError: "\x82" on EUC-JP
//}...