511件ヒット
[1-100件を表示]
(0.048秒)
ライブラリ
- ビルトイン (224)
- fiddle (24)
- ipaddr (12)
- logger (12)
- rake (12)
-
rexml
/ document (36) -
rubygems
/ dependency (12) - timeout (21)
-
webrick
/ httpservlet / abstract (72)
クラス
- Array (31)
- Bignum (3)
-
Fiddle
:: Pointer (12) -
File
:: Stat (12) - Fixnum (3)
-
Gem
:: Dependency (12) - IPAddr (12)
- Integer (84)
- Logger (12)
- Module (24)
- Numeric (12)
-
REXML
:: Attributes (24) -
REXML
:: Elements (12) - String (12)
- TracePoint (7)
-
WEBrick
:: HTTPServlet :: AbstractServlet (72)
モジュール
- Kernel (24)
-
Rake
:: TaskManager (12) - Timeout (21)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (24)
- <= (12)
- <=> (72)
- Closure (12)
-
NEWS for Ruby 3
. 1 . 0 (4) - Numeric (12)
- bigdecimal (12)
-
bit
_ length (18) -
bsearch
_ index (10) -
const
_ source _ location (12) - div (12)
-
do
_ DELETE (12) -
do
_ GET (12) -
do
_ HEAD (12) -
do
_ OPTIONS (12) -
do
_ POST (12) -
do
_ PUT (12) - downto (24)
-
instruction
_ sequence (7) - intern (12)
- length (12)
- pack (21)
- pack テンプレート文字列 (12)
- print (12)
-
rb
_ ary _ store (12) -
rb
_ time _ timespec _ new (10) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) - size (24)
- test (12)
- timeout (21)
- unpack (12)
検索結果
先頭5件
-
Integer
# <(other) -> bool (21112.0) -
比較演算子。数値として小さいか判定します。
...比較演算子。数値として小さいか判定します。
@param other 比較対象の数値
@return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 < 1 # => false
1 < 2 # => true
//}... -
Fiddle
:: Pointer # <=>(other) -> Integer (9200.0) -
ポインタの指すアドレスの大小を比較します。
...ポインタの指すアドレスの大小を比較します。
other より小さい場合は -1, 等しい場合は 0、other より大きい場合は
1を返します。
@param other 比較対象の Pointer オブジェクト... -
Integer
# <<(bits) -> Integer (9200.0) -
シフト演算子。bits だけビットを左にシフトします。
...シフト演算子。bits だけビットを左にシフトします。
@param bits シフトさせるビット数
//emlist[][ruby]{
printf("%#b\n", 0b0101 << 1) # => 0b1010
p -1 << 1 # => -2
//}... -
Integer
# <=(other) -> bool (9100.0) -
比較演算子。数値として等しいまたは小さいか判定します。
...other 比較対象の数値
@return self よりも other の方が大きい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 <= 0 # => false
1 <= 1 # => true
1 <= 2 # => true
//}... -
Integer
# <=>(other) -> -1 | 0 | 1 | nil (9100.0) -
self と other を比較して、self が大きい時に1、等しい時に 0、小さい時 に-1、比較できない時に nil を返します。
...、self が大きい時に1、等しい時に 0、小さい時
に-1、比較できない時に nil を返します。
@param other 比較対象の数値
@return -1 か 0 か 1 か nil のいずれか
//emlist[][ruby]{
1 <=> 2 # => -1
1 <=> 1 # => 0
2 <=> 1 # => 1
2 <=> '' # => nil
//}... -
Module
# <=>(other) -> Integer | nil (6206.0) -
self と other の継承関係を比較します。
...のクラスやモジュール
//emlist[例][ruby]{
module Foo
end
class Bar
include Foo
end
class Baz < Bar
end
class Qux
end
p Bar <=> Foo # => -1
p Baz <=> Bar # => -1
p Baz <=> Foo # => -1
p Baz <=> Qux # => nil
p Qux <=> Baz # => nil
p Baz <=> Object.new # => nil
//}... -
File
:: Stat # <=>(o) -> Integer | nil (6200.0) -
ファイルの最終更新時刻を比較します。self が other よりも 新しければ正の数を、等しければ 0 を古ければ負の数を返します。 比較できない場合は nil を返します。
...fp1 = Tempfile.open("first")
fp1.print "古い方\n"
sleep(1)
fp2 = Tempfile.open("second")
fp2.print "新しい方\n"
p File::Stat.new(fp1.path) <=> File::Stat.new(fp2.path) #=> -1
p File::Stat.new(fp2.path) <=> File::Stat.new(fp1.path) #=> 1
p File::Stat.new(fp1.path) <=> fp2.path #=> nil
//}... -
Gem
:: Dependency # <=>(other) -> Integer (6200.0) -
self と other を Gem::Dependency#name の ASCII コードで比較して self が大きい時には正の整数、等しい時には 0、小さい時には負の整数を返します。
self と other を Gem::Dependency#name の ASCII コードで比較して
self が大きい時には正の整数、等しい時には 0、小さい時には負の整数を返します。 -
IPAddr
# <=>(other) -> Integer | nil (6200.0) -
self と other を比較します。
...の IPAddr オブジェクト。
@return self と other のアドレスファミリが一致しない場合は nil を返します。
アドレスファミリが一致する場合は、両方の数値表現を Integer#<=>
で比較した結果を返します。
@see Integer#<=>...