るりまサーチ

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

別のキーワード

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

検索結果

Rational#<=>(other) -> -1 | 0 | 1 | nil (21265.0)

self と other を比較して、self が大きい時に 1、等しい時に 0、小さい時に -1 を返します。比較できない場合はnilを返します。

...
-
1 を返します。比較できない場合はnilを返します。

@param other 自身と比較する数値

@return -1 か 0 か 1 か nil を返します。

//emlist[例][ruby]{
Rational(2, 3) <=> Rational(2, 3) # => 0
Rational(5) <=> 5 # => 0
Rational(2, 3) <=> Rat...
...ional(1,3) # => 1
Rational(1, 3) <=> 1 # => -1
Rational(1, 3) <=> 0.3 # => 1
Rational(1, 3) <=> nil # => nil
//}...

Gem::Version#<=>(other) -> -1 | 0 | 1 | nil (21247.0)

self と other を比較して、self が小さい時に -1、 等しい時に 0、大きい時に 1 の整数を返します。 また、other が Gem::Version ではなく比較できないとき、 nil を返します。

... -1、
等しい時に 0、大きい時に 1 の整数を返します。
また、other が Gem::Version ではなく比較できないとき、 nil を返します。

//emlist[][ruby]{
p Gem::Version.new("3.9.0") <=> Gem::Version.new("3.10.0") # => -1
p Gem::Version.new("3.0.0") <=> Gem::Version...
....new("3.0.0") # => 0
p Gem::Version.new("3.0.0") <=> Gem::Version.new("3.0") # => 0

p Gem::Version.new("3.9.0") <=> "3.9.0" # => nil
//}

@param other 比較対象の Gem::Version のインスタンスを指定します。...

WEBrick::HTTPVersion#<=>(other) -> -1 | 0 | 1 | nil (21217.0)

自身と指定された other のバージョンを比較します。 自身が other より新しいなら 1、同じなら 0、古いなら -1 を返します。 比較できない場合に nil を返します。

...同じなら 0、古いなら -1 を返します。
比較できない場合に nil を返します。

@param other HTTP のバージョンを表す WEBrick::HTTPVersion オブジェクトか文字列を指定します。

require 'webrick'
v = WEBrick::HTTPVersion.new('1.1')
p v < '1.0'...

1.6.8から1.8.0への変更点(まとめ) (2760.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...作はなくなりました)

$defout や $deferr に代入を行うと警告がでます。
(注:1.6 に $deferr はありません)
((<ruby-dev:20961>))

$stdin にオブジェクトを代入すると標準入力からの入力メソッド(gets 等)
はそのオブジェクトにメソ...
... IO クラスが include するように
なりました。((<ruby-dev:20964>))

: ((<UnboundMethod>)) [compat]

UnboundMethod クラスは Method クラスのサブクラスではなくなりました。
UnboundMethod#call, UnboundMethod#unbind はなくなりました。
((<ruby-core:00...
...!|String/reverse!>)) の挙動と
同じです。((<ruby-dev:20135>))

: ((<Array#-|Array/->)) [change]

差を求めるときに重複した値は取り除かなくなりました。

=== Comparable

: ((<Comparable>)) [change]

obj#<=> が nil を返すような引数に対して、>, >=, <,...

ruby 1.8.3 feature (1668.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影響の範囲が小さいと思われる変更もこちら
* [change]: 変更されたクラス/メソッドなど(互換...
...= 2005-09-19
: FileUtils.remove_entry_secure [lib] [new]
: FileUtils.remove_entry [lib] [new]
: FileUtils.chmod_R [lib] [new]
: FileUtils.chown [lib] [new]
: FileUtils.chown_R [lib] [new]
: FileUtils.commands [lib] [new]
: FileUtils.options...
...す。

=== 2005-03-07
: String#<=> [ruby][compat]

比較できないものを渡された時に false ではなく nil を返すようになりました。
((<ruby-dev:25811>))

$ ruby-1.8.2 -e 'p "a" <=> 1'
false
$ ruby-1.8.3 -e 'p "a" <=> 1'
nil


=== 2005-03-06
: HTTPHeader...

絞り込み条件を変える

NEWS for Ruby 2.7.0 (360.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.6.0 以降の変更

=== 言語仕様の変更

==== パターンマッチ

* パターンマ...
..._VERSION
when ..."2.4" then puts "EOL"
# ...
end

age.clamp(..100)

where(sales: ..100)
//}

* 「$;」にnil以外の値を設定すると警告が出るようになりました。 14240
nil以外の時はString#splitで参照した時も警告が出ます。
この警告は「-W:no-depre...
...//emlist[][ruby]{
-
1.clamp(0..2) #=> 0
1.clamp(0..2) #=> 1
3.clamp(0..2) #=> 2
# With beginless and endless ranges:
-
1.clamp(0..) #=> 0
3.clamp(..2) #=> 2
//}

* Complex
* 新規メソッド
* Complex#<=>が追加されました。
その結果、「0 <=> 0i」がNoMethodE...

Fiddle::Importer#bind(signature, *opts) { ... } -> Fiddle::Function (224.0)

Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。

...す。

これでインポートされた関数はモジュール関数として定義されます。
また、Fiddle::Importer#[] で Fiddle::Function オブジェクトとして
取り出すことができます。

signature で関数の名前とシネグチャを指定します。例えば
"int...
...x.to_s(Fiddle::SIZEOF_INT).unpack("i!")
y = py.to_s(Fiddle::SIZEOF_INT).unpack("i!")

x <=> y
}
end

data = [32, 180001, -13, -1, 0, 49].pack("i!*")
M.qsort(Fiddle::Pointer[data], 6, Fiddle::SIZEOF_INT, M["compare"])
p data.unpack("i!*") # => [-13, -1, 0, 32, 49, 180001]...

rss (78.0)

RSS を扱うためのライブラリです。

...=== 参考

* RSS 0.91 http://backend.userland.com/rss091
* RSS 1.0 http://purl.org/rss/1.0/spec
* RSS 2.0 http://www.rssboard.org/rss-specification
* Atom 1.0 https://www.ietf.org/rfc/rfc4287.txt

=== 注意

RSS ParserはRSS 0.9x/1.0/2.0, Atom 1.0 をサポートしていますが,RS...
...ュールはそれぞれ、
* Dublin Core モジュール http://web.resource.org/rss/1.0/modules/dc/
* Syndication モジュール http://web.resource.org/rss/1.0/modules/syndication/
* Content モジュール http://web.resource.org/rss/1.0/modules/content/
* Trackback モジュール http://...
...いものしか含まれていないは
ずなので以下のようにソートできます。

def print_items(items)
items.sort do |x, y|
y.dc_date <=> x.dc_date
end.each do |item|
puts "#{item.dc_date.localtime.iso8601} : #{item.title} : #{item.description}"
end
end...