るりまサーチ

最速Rubyリファレンスマニュアル検索!
595件ヒット [101-200件を表示] (0.134秒)
トップページ > クエリ:I[x] > クエリ:IO[x] > クエリ:-[x] > クエリ:==[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io readlines
  5. io each_line

検索結果

<< < 1 2 3 4 ... > >>

Gem::Requirement#satisfied_by?(version) -> bool (12300.0)

引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。

...version が自身に含まれる全ての必要条件を満たす場合に true を返します。
そうでなければ、false を返します。

@param version Gem::Version のインスタンスを指定します。

//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")

p req.satisfied_by?(...
...Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::Version.new('3.3.0')) # => false
//}...

Thread::ConditionVariable (12048.0)

スレッドの同期機構の一つである状態変数を実現するクラスです。

...一つである状態変数を実現するクラスです。

以下も ConditionVariable を理解するのに参考になります。

https://ruby-doc.com/docs/ProgrammingRuby/html/tut_threads.html#UF

==
= Condition Variable とは

あるスレッド A が排他領域で動いていたとしま...
...状況を解決するのが Condition Variable です。

スレッド a で条件(リソースが空いているかなど)が満たされるまで wait メソッドで
スレッドを止めます。他のスレッド b において条件が満たされたなら signal
メソッドでスレッド a...
...= Mutex.new
cv = ConditionVariable.new

a = Thread.start {
mutex.synchronize {
...
while (条件が満たされない)
cv.wait(mutex)
end
...
}
}

b = Thread.start {
mutex.synchronize {
# 上の条...

Continuation (12030.0)

継続を表すクラスです。

...。cont は、Continuation クラスのインスタ
ンスで、Continuation#call メソッドを実行するこ
とでいつでも記憶した状態を継続することができます。

C 言語の setjmp()/longjmp() がわかる人は
setjmp() == callcc {|c| }
longjmp() == c.call
と考え...
...callcc() は、ブロックの戻り値を返しますが、Continuation#call(args)
が呼び出されたときは args を返します。

例:

以下は、Continuationによる無限ループの例

def LOOP
c = nil
yield callcc {|cnt| c = cnt; true }
c.call(false)
end

L...
...OOP {|v| p v}

=> true
false
false
false
:
:

callcc とは、call-with-current-continuation の略です。...

Matrix#lup_decomposition -> Matrix::LUPDecomposition (9506.0)

行列の LUP 分解を保持したオブジェクトを返します。

...Matrix::LUPDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(下三角行列、上三角行列、置換行列)
を得ることができます。これを [L, U, P] と書くと、
L*U = P*self を満たします。

//emlist[例][ruby]{
require 'matrix'
a...
...= Matrix[[1, 2], [3, 4]]
l, u, p = a.lup
l.lower_triangular? # => true
u.upper_triangular? # => true
p.permutation? # => true
l * u == p * a # => true
a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)]
//}

@see Matrix::LUPDecomposition...

Gem::Requirement#=~(version) -> bool (9300.0)

引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。

...version が自身に含まれる全ての必要条件を満たす場合に true を返します。
そうでなければ、false を返します。

@param version Gem::Version のインスタンスを指定します。

//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")

p req.satisfied_by?(...
...Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::Version.new('3.3.0')) # => false
//}...

絞り込み条件を変える

RubyVM::InstructionSequence.disasm(body) -> String (9230.0)

引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。

...::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。

@param body Proc、Method オブジェクトを指定します。

例1:Proc オブジェクトを指定した場合

# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::Instruction...
...isasm(p)

出力:

==
disasm: <RubyVM::InstructionSequence:block in <main>@/tmp/proc.rb>===
=
= catch table
| catch type: redo st: 0000 ed: 0012 sp: 0000 cont: 0000
| catch type: next st: 0000 ed: 0012 sp: 0000 cont: 0012
|----------------------------------------------------------------...
...--------
local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1)
[ 2] num
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 dup
0009 setlocal num, 0...

RubyVM::InstructionSequence.disassemble(body) -> String (9230.0)

引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。

...::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。

@param body Proc、Method オブジェクトを指定します。

例1:Proc オブジェクトを指定した場合

# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::Instruction...
...isasm(p)

出力:

==
disasm: <RubyVM::InstructionSequence:block in <main>@/tmp/proc.rb>===
=
= catch table
| catch type: redo st: 0000 ed: 0012 sp: 0000 cont: 0000
| catch type: next st: 0000 ed: 0012 sp: 0000 cont: 0012
|----------------------------------------------------------------...
...--------
local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1)
[ 2] num
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 dup
0009 setlocal num, 0...

Gem::Version::Requirement -> Class (9206.0)

Gem::Requirement のエイリアスです。

...Gem::Requirement のエイリアスです。

//emlist[][ruby]{
p Gem::Version::Requirement == Gem::Requirement # => true
//}...

RubyVM::InstructionSequence#disasm -> String (9206.0)

self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。

...ubyVM::InstructionSequence.compile('1 + 2').disasm

出力:

==
disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>...
...0008 leave

@see RubyVM::InstructionSequence.disasm...

RubyVM::InstructionSequence#disassemble -> String (9206.0)

self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。

...ubyVM::InstructionSequence.compile('1 + 2').disasm

出力:

==
disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>...
...0008 leave

@see RubyVM::InstructionSequence.disasm...

絞り込み条件を変える

<< < 1 2 3 4 ... > >>