るりまサーチ

最速Rubyリファレンスマニュアル検索!
18061件ヒット [1-100件を表示] (0.255秒)

別のキーワード

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

クラス

キーワード

検索結果

<< 1 2 3 ... > >>

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

差を計算します。

...差を計算します。

@
param other 自身から引く数

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

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

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

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

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

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

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

Array#-(other) -> Array (21343.0)

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

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

要素の同一性は Object#eql? により評価されます。
self 中で重複していて、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]
//}


@
see Array#difference...

RubyVM::InstructionSequence#to_binary(extra_data = nil) -> String (21343.0)

バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

...返します。
Ruby
VM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

引数の extra_data はバイナリデータと共に保存されます。
Ruby
VM::InstructionSequence.load_from_binary_extra_data メソッド...
... to_binary で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。

//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_b...
...inary("extra_data")

# ※表示の都合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\x00\x03\x00\x00\x00\x16\x02\x00\x00\n\x00\x00\x00\x01
# \x00\x00\x00\x03\x00\x00\x00\x05\x00\x00\x00\x84\x01\x00\x00\x88\x01\x00
# \x00\x02\x02\x00\x00x86_64-darwin15\x00*\x00\x00\x00\x00...

Array#-(other) -> Array (21337.0)

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

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

要素の同一性は Object#eql? により評価されます。
self 中で重複していて、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]
//}...

絞り込み条件を変える

Float#-(other) -> Float (21325.0)

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

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

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

//emlist[例][ruby]{
# 差
4.5 - 1.3 # => 3.2
//}...

Vector#r -> Float (21320.0)

ベクトルの大きさ(ノルム)を返します。

...ベクトルの大きさ(ノルム)を返します。

//emlist[例][ruby]{
r
equire 'matrix'
Vector[3, 4].norm # => 5.0
Vector[Complex(0, 1), 0].norm # => 1.0
//}

@
see Vector#normalize...

JSON::Generator::GeneratorMethods::Array#to_json(state_or_hash = nil) -> String (21319.0)

自身から生成した JSON 形式の文字列を返します。

...

@
param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。

//emlist[例][ruby]{
r
equire "jso...
...n"

[1, 2, 3].to_json # => "[1,2,3]"
//}...

String#lstrip -> String (18557.0)

文字列の先頭にある空白文字を全て取り除いた新しい文字列を返します。 空白文字の定義は " \t\r\n\f\v\0" です。

...にある空白文字を全て取り除いた新しい文字列を返します。
空白文字の定義は " \t\r\n\f\v\0" です。

//emlist[例][ruby]{
p " abc\n".lstrip #=> "abc\n"
p "\t abc\n".lstrip #=> "abc\n"
p "abc\n".lstrip #=> "abc\n"
//}

@
see String#strip, String#rstrip...

String#strip -> String (18557.0)

文字列先頭と末尾の空白文字を全て取り除いた文字列を生成して返します。 空白文字の定義は " \t\r\n\f\v\0" です。

...義は " \t\r\n\f\v\0" です。

//emlist[例][ruby]{
p " abc \r\n".strip #=> "abc"
p "abc\n".strip #=> "abc"
p " abc".strip #=> "abc"
p "abc".strip #=> "abc"
p " \0 abc \0".strip #=> "abc"

str = "\tabc\n"
p str.strip #=> "abc"
p str...
...#=> "\tabc\n" (元の文字列は変化しない)
//}

@
see String#lstrip, String#rstrip...

絞り込み条件を変える

<< 1 2 3 ... > >>