種類
- インスタンスメソッド (66)
- 文書 (15)
- 変数 (11)
- クラス (11)
クラス
-
Process
:: Status (55) - Symbol (11)
モジュール
- Kernel (11)
キーワード
-
$ CHILD _ STATUS (11) - & (11)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - == (11)
- >> (11)
-
NEWS for Ruby 3
. 0 . 0 (4) - Status (11)
-
to
_ proc (11) -
to
_ s (11)
検索結果
先頭5件
-
Process
:: Status # to _ i -> Integer (21101.0) -
C 言語での終了ステータス表現の整数を返します。
C 言語での終了ステータス表現の整数を返します。
多くのシステムの実装では、この値の上位 8 bit に exit(2)
に渡した終了ステータスが、下位 8 bit にシグナル等で終了した等の情
報が入っています。 -
Symbol
# to _ proc -> Proc (6278.0) -
self に対応する Proc オブジェクトを返します。
...self に対応する Proc オブジェクトを返します。
生成される Proc オブジェクトを呼びだす(Proc#call)と、
Proc#callの第一引数をレシーバとして、 self という名前のメソッドを
残りの引数を渡して呼びだします。
//emlist[明示的に......呼ぶ例][ruby]{
:to_i.to_proc["ff", 16] # => 255 ← "ff".to_i(16)と同じ
//}
//emlist[暗黙に呼ばれる例][ruby]{
# メソッドに & とともにシンボルを渡すと
# to_proc が呼ばれて Proc 化され、
# それがブロックとして渡される。
(1..3).collect(&:to_s) #......対応する Proc オブジェクトを返します。
生成される Proc オブジェクトを呼びだす(Proc#call)と、
Proc#callの第一引数をレシーバとして、 self という名前のメソッドを
残りの引数を渡して呼びだします。
生成される Proc オブジ......by]{
:object_id.to_proc.lambda? # => true
//}
//emlist[明示的に呼ぶ例][ruby]{
:to_i.to_proc["ff", 16] # => 255 ← "ff".to_i(16)と同じ
//}
//emlist[暗黙に呼ばれる例][ruby]{
# メソッドに & とともにシンボルを渡すと
# to_proc が呼ばれて Proc 化され、
# そ... -
Process
:: Status # >>(num) -> Integer (3022.0) -
self.to_i >> num と同じです。
...self.to_i >> num と同じです。
@param num 整数を指定します。
fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99... -
Process
:: Status # &(other) -> Integer (3016.0) -
self.to_i & other と同じです。 このメソッドは後方互換性のためにあります。
...self.to_i & other と同じです。
このメソッドは後方互換性のためにあります。
@param other 自身との & 演算をしたい整数を指定します。... -
Process
:: Status # to _ s -> String (3016.0) -
to_i.to_s と同じです。
...
to_i.to_s と同じです。... -
Process
:: Status (3012.0) -
プロセスの終了ステータスを表すクラスです。 メソッド Process.#wait2 などの返り値として使われます。
...プロセスの終了ステータスを表すクラスです。
メソッド Process.#wait2 などの返り値として使われます。
=== 使用例
wait を使用した例
fork { exit }
Process.wait
case
when $?.signaled?
p "child #{$?.pid} was killed by signal #{$?.termsig}"......?
# 実際には Process.wait を使用しているので、ここに来ることはない
p "child #{$?.pid} was stopped by signal #{$?.stopsig}"
when $?.exited?
p "child #{$?.pid} exited normally. status=#{$?.exitstatus}"
else
p "unknown status %#x" % $?.to_i
end
SIGCHLD を......了に対して1つの SIGCHLD しか届かない
# 場合があるのでループさせる必要があります
while Process.waitpid(-1, Process::WNOHANG|Process::WUNTRACED)
case
when $?.signaled?
puts " child #{$?.pid} was killed by signal #{$?.termsig}"
if... -
Process
:: Status # ==(other) -> bool (3006.0) -
同じステータスの場合に真を返します。
...同じステータスの場合に真を返します。
other が数値の場合、self.to_i との比較が行われます。こ
れは後方互換性のためです。
@param other 自身と比較したいオブジェクトを指定します。... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (312.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......, String#to_i、String#oct もこの prefix を認識します。
: ((<メソッド引数の & 修飾|メソッド呼び出し/イテレータ>)) [compat]
: ((<Proc#to_proc|Proc/to_proc>)) [new]
メソッドに渡す引数に & を修飾した場合、渡すオブジェクトが to_proc を... -
Kernel
$ $ CHILD _ STATUS -> Process :: Status | nil (106.0) -
$? の別名
...$? の別名
require "English"
out = `wget https://www.ruby-lang.org/en/about/license.txt -O - 2>/dev/null`
if $CHILD_STATUS.to_i == 0
print "wget success\n"
out.split(/\n/).each { |line|
printf "%s\n", line
}
else
print "wget failed\n"
end... -
NEWS for Ruby 3
. 0 . 0 (48.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])......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......`Kernel`: `#class`, `#frozen?`
* `Integer`: `#-@`, `#~`, `#abs`, `#bit_length`, `#even?`, `#integer?`, `#magnitude`, `#odd?`, `#ord`, `#to_i`, `#to_int`, `#zero?`
* `Struct`: reader methods for 10th or later members
* Constant references are inlined.
* Always generate appropr...