種類
- 文書 (53)
- インスタンスメソッド (50)
- モジュール関数 (22)
ライブラリ
- ビルトイン (66)
-
shell
/ command-processor (6)
クラス
モジュール
- Enumerable (44)
-
Process
:: GID (11) -
Process
:: UID (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (4) - detect (22)
-
find
_ system _ command (6) -
from
_ name (22) -
ruby 1
. 6 feature (11)
検索結果
先頭5件
-
Enumerable
# find(ifnone = nil) -> Enumerator (15132.0) -
要素に対してブロックを評価した値が真になった最初の要素を返します。
...えば Proc) を指定します。
//emlist[例][ruby]{
# 最初の 3 の倍数を探す
p [1, 2, 3, 4, 5].find {|i| i % 3 == 0 } # => 3
p [2, 2, 2, 2, 2].find {|i| i % 3 == 0 } # => nil
# ifnone の使用例
ifnone = proc { raise ArgumentError, "item not found" }
p [1, 2, 3, 4, 5].find(ifnone... -
Enumerable
# find(ifnone = nil) {|item| . . . } -> object (15132.0) -
要素に対してブロックを評価した値が真になった最初の要素を返します。
...えば Proc) を指定します。
//emlist[例][ruby]{
# 最初の 3 の倍数を探す
p [1, 2, 3, 4, 5].find {|i| i % 3 == 0 } # => 3
p [2, 2, 2, 2, 2].find {|i| i % 3 == 0 } # => nil
# ifnone の使用例
ifnone = proc { raise ArgumentError, "item not found" }
p [1, 2, 3, 4, 5].find(ifnone... -
Shell
:: CommandProcessor # find _ system _ command(command) (9101.0) -
@todo
@todo -
Process
:: GID . # from _ name(name) -> Integer (3006.0) -
引数で指定した名前の実グループ ID を返します。
...引数で指定した名前の実グループ ID を返します。
Process::GID.from_name("wheel") # => 0
Process::GID.from_name("nosuchgroup") # => can't find group for nosuchgroup (ArgumentError)
@param name グループ名を指定します。
@raise ArgumentError 引数で指定した... -
Process
:: UID . # from _ name(name) -> Integer (3006.0) -
引数で指定した名前の実ユーザ ID を返します。
...引数で指定した名前の実ユーザ ID を返します。
Process::UID.from_name("root") # => 0
Process::UID.from_name("nosuchuser") # => can't find user for nosuchuser (ArgumentError)
@param name ユーザ名を指定します。
@raise ArgumentError 引数で指定したユーザが... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (288.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への変更点(まとめ)/サポートプラットフォームの追加>))
...らしい
^^;;)
: ((<Proc/Proc.new>)) [change]
: ((<組み込み関数/lambda>)) [change]
: ((<組み込み関数/proc>)) [change]
以下のように変更されました。((<ruby-dev:20358>))
* Proc.new およびブロック引数で与えられる Proc は
引数チェ......ックがゆるい。break が例外になる。
Proc.new {|a,b,c| p [a,b,c]}.call(1,2)
=> -:1: wrong # of arguments (2 for 3) (ArgumentError)
from -:1:in `call'
from -:1
ruby 1.6.8 (2002-12-24) [i586-lin......。
また、空白類に特殊な意味はなくなりました('\0'の効果は残っています)。
=== Enumerable
: ((<Enumerable#find|Enumerable/find>)) [change]
引数に文字列を指定できなくなりました。
また、要素が見つからなかった場合は、ifnone の... -
NEWS for Ruby 3
. 0 . 0 (54.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ror 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 a single rest argument and no keywords.
16166
//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}
pr.call([1])......#=> 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......be compatible for essentially all usages and avoids blocking when using a scheduler. 16792
* Proc
* Proc#== and Proc#eql? are now defined and will return true for separate Proc instances if the procs were created from the same block. 14267
* Queue / SizedQueue
* Queue#pop, SizedQueue#pu... -
NEWS for Ruby 2
. 0 . 0 (48.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...す
* Hash
* 追加: Hash#to_h 明示的に変換するメソッドです。Array#to_a に似ています
* 拡張: Hash#default_proc= default proc をクリアするために nil を渡せるようになりました
* IO
* 非推奨: IO#lines, #bytes, #chars, #codepoints
* Kern......* ObjectSpace::WeakMap
* 弱い参照を保持するための低レベルのクラスです。
* Proc
* 非互換: Proc#== と #eql? を削除。
* Process
* 追加: Process#getsid session id を取得します(unix のみ)。
* Range
* 追加: Range#size サイズの......* 拡張: OpenStruct.new OpenStruct/Struct のインスタンスを受け付けるようになりました
* pathname
* 拡張: Pathname#find ブロックを与えない場合 Enumerator を返すようになりました
* rake
* 0.9.5 に更新
* This version is backwards-co... -
NEWS for Ruby 2
. 6 . 0 (48.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...警告が削除されました。 12490
以下のようなコードを警告なしに書くことができます:
//emlist{
user = users.find {|user| cond(user) }
//}
* 例外が捕捉されず、バックトレースとエラーメッセージが表示されるときに、
例外......しいキーと値に変換できるようになりました。 15143
* Proc
* 新規メソッド
* 関数合成用に Proc#<< と Proc#>> が追加されました。 6284
* 非互換な変更
* Proc#call が $SAFE を変更しなくなりました。 14250
* Random
*......bstractSyntaxTree.parse_file はファイルをパースして AST ノードを返します。 [実験的]
* RubyVM::AbstractSyntaxTree.of は proc やメソッドに対応する AST ノードを返します。 [実験的]
* RubyVM
* 新規メソッド
* RubyVM.resolve_feature_pat... -
NEWS for Ruby 2
. 2 . 0 (42.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...entError ではなく
ArgumentError のサブクラスである UncaughtThrowError を発生させるようになりました
* Process
* 拡張: Process.spawn のような外部プロセスを起動するメソッドは [:out, :err] からリダイレクト
されたファイル......によって返される多くのシンボルがGC可能になりました
* Method
* 追加: Method#curry([arity]) はカリー化された Proc オブジェクトを返します
* 追加: Method#super_method はスーパクラスの同名のメソッドの Method オブジェクトを......* 追加: Etc.#uname
* 追加: Etc.#sysconf
* 追加: Etc.#confstr
* 追加: IO#pathconf
* 追加: Etc.#nprocessors
* find, pathname
* 拡張: Find.#find は "ignore_error" というキーワード引数を受け付けるようになりました
* Matrix
* 追加: Mat... -
ruby 1
. 6 feature (36.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......d>))
サイズが 0 で中身のあるファイル(Linux の /proc ファイルシステムでこ
のような場合があります)が File#read などで読めないバグが修正されまし
た。
p File.open("/proc/#$$/cmdline").read
=> ruby 1.6.7 (2002-03-01) [i586-li......くなりました。((<ruby-bugs-ja:PR#205>))
* ((<Enumerable/each_with_index>)) が self を返すようになった(以前は nil)
* ((<Process/Process.setpgrp>)) が返す値が不定だった。
* ((<String/ljust>)), ((<String/rjust>)), ((<String/center>)) の結果に
変化がな...