るりまサーチ

最速Rubyリファレンスマニュアル検索!
21539件ヒット [101-200件を表示] (0.145秒)

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

キーワード

検索結果

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

RubyVM::InstructionSequence#path -> String (26107.0)

self が表す命令シーケンスの相対パスを返します。

...= RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts "hello, world"
end

# irb
> iseq = Ruby...
...VM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"

@
see RubyVM::InstructionSequence#absolute_path...

Time#-(sec) -> Time (18169.0)

自身より sec 秒だけ前の時刻を返します。

...り sec 秒だけ前の時刻を返します。

@
param sec 実数を秒を単位として指定します。

//emlist[][ruby]{
p t = Time.local(2000) # => 2000-01-01 00:00:00 +0900
p t2 = t + 2592000 # => 2000-01-31 00:00:00 +0900
p t2 - 2592000 # => 2000-01-01 00:00:00 +0900
//}...

Time#-(time) -> Float (18159.0)

自身と time との時刻の差を Float で返します。単位は秒です。

...返します。単位は秒です。

@
param time 自身との差を算出したい Time オブジェクトを指定します。

//emlist[][ruby]{
p t = Time.local(2000) # => 2000-01-01 00:00:00 +0900
p t2 = t + 2592000 # => 2000-01-31 00:00:00 +0900
p t2 - t # => 2592000.0
//}...

Array#-(other) -> Array (18143.0)

自身から other の要素を取り除いた配列を生成して返します。

...の重複が保持されます。

@
param other 自身から取り除きたい要素の配列を指定します。
配列以外のオブジェクトを指定した場合は to_ary メソッドによ
る暗黙の型変換を試みます。

@
raise TypeError 引数に配列...
...以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
[1, 2, 1, 3, 1, 4] - [4, 2] # => [1, 1, 3, 1]

[1, 2, 1, 3, 1, 4] - [1, 4] # => [2, 3]
//}...
...以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
[1, 2, 1, 3, 1, 4] - [4, 2] # => [1, 1, 3, 1]

[1, 2, 1, 3, 1, 4] - [1, 4] # => [2, 3]
//}


@
see Array#difference...

Complex#-(other) -> Complex (18131.0)

差を計算します。

...差を計算します。

@
param other 自身から引く数

//emlist[例][ruby]{
Complex(1, 2) - Complex(2, 3) # => (-1-1i)
//}...

絞り込み条件を変える

Integer#-(other) -> Numeric (18131.0)

算術演算子。差を計算します。

...算術演算子。差を計算します。

@
param other 二項演算の右側の引数(対象)
@
return 計算結果

//emlist[][ruby]{
4 - 1 #=> 3
//}...

Rational#-(other) -> Rational | Float (18131.0)

差を計算します。

...差を計算します。

@
param other 自身から引く数

other に Float を指定した場合は、計算結果を Float で返しま
す。

//emlist[例][ruby]{
r = Rational(3, 4)
r - 1 # => (-1/4)
r - 0.5 # => 0.25
//}...

Set#-(enum) -> Set (18131.0)

差集合、すなわち、元の集合の要素のうち引数 enum に含まれる要素を取り除いた 新しい集合を作ります。

...合を作ります。

@
param enum each メソッドが定義されたオブジェクトを指定します。
@
raise ArgumentError 引数 enum に each メソッドが定義されていない場合に
発生します。

//emlist[][ruby]{
require 'set'
p Set[10, 20, 30] - Set[10, 20, 40]
# =>...
...い集合を作ります。

@
param enum each メソッドが定義されたオブジェクトを指定します。
@
raise ArgumentError 引数 enum に each メソッドが定義されていない場合に
発生します。

//emlist[][ruby]{
p Set[10, 20, 30] - Set[10, 20, 40]
# => #<Set:...

Float#-(other) -> Float (18125.0)

算術演算子。差を計算します。

...算術演算子。差を計算します。

@
param other 二項演算の右側の引数(対象)

//emlist[例][ruby]{
# 差
4.5 - 1.3 # => 3.2
//}...
<< < 1 2 3 4 ... > >>