るりまサーチ

最速Rubyリファレンスマニュアル検索!
40118件ヒット [1-100件を表示] (0.127秒)
トップページ > クエリ:>[x] > クエリ:ruby[x]

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. module >
  4. float >
  5. complex >

ライブラリ

クラス

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Gem.#ruby -> String (18217.0)

実行中のRubyインタプリタのパスを返します。

...実行中のRubyインタプリタのパスを返します。...

RbConfig.ruby -> String (18217.0)

ruby コマンドのフルパスを返します。

...
ruby
コマンドのフルパスを返します。...

Module#>(other) -> bool | nil (18142.0)

比較演算子。 self が other の先祖である場合、true を返します。 self が other の子孫か同一クラスである場合、false を返します。

...][ruby]{
module Awesome; end
module Included
include Awesome
end
module Prepended
prepend Awesome
end

Included.ancestors # => [Included, Awesome]
Awesome > Included # => true
Included > Awesome # => false

Prepended.ancestors # => [Awesome, Prepended]
Awesome > Prepended # => true
Prepended > A...
...wesome # => false

Awesome > Awesome # => false
Awesome > Object # => nil
//}...

Hash#>(other) -> bool (18124.0)

other が self のサブセットである場合に真を返します。

...サブセットである場合に真を返します。

@param other 自身と比較したい Hash オブジェクトを指定します。

//emlist[例][ruby]{
h1 = {a:1, b:2}
h2 = {a:1, b:2, c:3}
h1 > h2 # => false
h2 > h1 # => true
h1 > h1 # => false
//}

@see Hash#<=, Hash#<, Hash#>=...

Comparable#>(other) -> bool (18118.0)

比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が正の整数を返した場合に、true を返します。 それ以外の整数を返した場合に、false を返します。

...=> をもとにオブジェクト同士を比較します。
<=> が正の整数を返した場合に、true を返します。
それ以外の整数を返した場合に、false を返します。

@param other 自身と比較したいオブジェクトを指定します。
@raise ArgumentError <=>...
...が nil を返したときに発生します。

//emlist[例][ruby]{
1 > 0 # => true
1 > 1 # => false
//}...

絞り込み条件を変える

Integer#>(other) -> bool (18118.0)

比較演算子。数値として大きいか判定します。

...演算子。数値として大きいか判定します。

@param other 比較対象の数値
@return self よりも other の方が小さい場合 true を返します。
そうでなければ false を返します。

//emlist[][ruby]{
1 > 0 # => true
1 > 1 # => false
//}...

Float#>(other) -> bool (18112.0)

比較演算子。数値として大きいか判定します。

...として大きいか判定します。

@param other 比較対象の数値
@return self よりも other の方が小さい場合 true を返します。
そうでなければ false を返します。

//emlist[例][ruby]{
3.14 > 3.1415 # => false
3.14 >= 3.1415 # => false
//}...

Rubyの起動 (6345.0)

Rubyの起動 * cmd_option * shebang

...Rubyの起動
* cmd_option
* shebang

Ruby
インタプリタの起動は以下の書式のコマンドラインにより行います。

ruby
[ option ...] [ -- ] [ programfile ] [ argument ...]

ここで、option は後述のcmd_option
のいずれかを指定します。-- は、オプシ...
...ョン列の終りを明示するため
に使用できます。programfile は、Ruby スクリプトを記述したファイ
ルです。これを省略したり`-' を指定した場合には標準入力を Ruby
クリプトとみなします。

programfile が `#!' で始まるファイル...
...更しない場合

$ ruby -e 'p Encoding.default_external; p Encoding.default_internal'
#<Encoding:UTF-8>
nil


# 外部エンコーディングをEUC-JPにする場合

$ ruby -E EUC-JP -e 'p Encoding.default_external; p Encoding.default_internal'
#<Encoding:EUC-JP>
nil

$ ruby --encoding EUC-JP -...

Hash.ruby2_keywords_hash?(hash) -> bool (6291.0)

Module#ruby2_keywordsやProc#ruby2_keywordsによる ruby2_keywords フラグが設定されているかどうかを返します。

...Module#ruby2_keywordsやProc#ruby2_keywordsによる
ruby
2_keywords フラグが設定されているかどうかを返します。

このメソッドはデバッグや調査、シリアライゼーションのために本当に必要な場合のために
用意されていて、普通のプログ...
...れていません。

ruby
2.7.1 で追加されたため、ruby 2.7.0 では定義されていません。

//emlist[][ruby]{
ruby
2_keywords def foo(*args)
Hash.ruby2_keywords_hash?(args.last)
end
foo(k: 1) # => true
foo({k: 1}) # => false
//}

@see Module#ruby2_keywords, Proc#ruby2_keywords...
<< 1 2 3 ... > >>