74件ヒット
[1-74件を表示]
(0.022秒)
種類
- インスタンスメソッド (33)
- 特異メソッド (33)
- 文書 (8)
キーワード
- <=> (11)
-
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (3) - glob (22)
- native (11)
- new (11)
検索結果
先頭5件
-
IPAddr
# |(ipaddr) -> IPAddr (35346.0) -
他の IPAddr オブジェクトとのビットごとの論理和により、 新しい IPAddr オブジェクトを生成します。
...他の IPAddr オブジェクトとのビットごとの論理和により、
新しい IPAddr オブジェクトを生成します。
@param ipaddr 他の IPAddr オブジェクト。
また、数値や文字列も受け付けます。... -
IPAddr
# native -> self | IPAddr (17236.0) -
IPv4 射影 IPv6 アドレスや IPv4 互換 IPv6 アドレスから、 IPv4 アドレスの新しい IPAddr オブジェクトを返します。 IPv4 互換でも IPv4 組み込みでもないなら self を返します。
...、
IPv4 アドレスの新しい IPAddr オブジェクトを返します。
IPv4 互換でも IPv4 組み込みでもないなら self を返します。
例:
require "ipaddr"
p IPAddr.new("0000:0000:0000:0000:0000:ffff:c0a8:0001").native
# => #<IPAddr: IPv4:192.168.0.1/255.255.255.255... -
IPAddr
# <=>(other) -> Integer | nil (17107.0) -
self と other を比較します。
...self と other を比較します。
@param other 比較対象の IPAddr オブジェクト。
@return self と other のアドレスファミリが一致しない場合は nil を返します。
アドレスファミリが一致する場合は、両方の数値表現を Integer#<=>... -
Pathname
. glob(pattern , flags=0) {|pathname| . . . } -> nil (107.0) -
ワイルドカードの展開を行なった結果を、 Pathname オブジェクトの配列として返します。
...@param pattern ワイルドカードパターンです
@param flags パターンマッチ時のふるまいを変化させるフラグを指定します
//emlist[][ruby]{
require "pathname"
Pathname.glob("lib/i*.rb") # => [#<Pathname:lib/ipaddr.rb>, #<Pathname:lib/irb.rb>]
//}
@see Dir.glob......イルドカードパターンです
@param flags パターンマッチ時のふるまいを変化させるフラグを指定します
//emlist[][ruby]{
require "pathname"
Pathname.glob("lib/i*.rb") # => [#<Pathname:lib/ipaddr.rb>, #<Pathname:lib/irb.rb>]
//}
@see Dir.glob
@see Pathname#glob... -
NEWS for Ruby 2
. 7 . 0 (72.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...加されました。 15323
* Enumerable#tallyが追加されました。 11076
//emlist[Enumerable#filter_map][ruby]{
[1, 2, 3].filter_map {|x| x.odd? ? x.to_s : nil } #=> ["1", "3"]
//}
//emlist[Enumerable#tally][ruby]{
["A", "B", "C", "B", "A"].tally #=> {"A"=>2, "B"=>2, "C"=>1}
//}
* En......{
a = %w(foo bar baz)
e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager
p e.class #=> Enumerator
p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"]
//}
//emlist[Enumerator::Lazy#with_index][ruby]{
("a"..).lazy.with_index(1) { |it, index| puts "#{index}:#{it}" }.take(3).force......されました。 15964
* Net::HTTP
* Net::HTTP#startにTCP/IP接続のアドレスを置き換えるための
オプション引数ipaddrが追加されました。 5180
* Net::IMAP
* Server Name Indication (SNI) のサポートが追加されました。 15594
* open-uri... -
Range
. new(first , last , exclude _ end = false) -> Range (36.0) -
first から last までの範囲オブジェクトを生成して返しま す。
...te.today, Date.today >> 1).each {|d| puts d }
# => 2017-09-16
# 2017-09-17
# ...
# 2017-10-16
//}
//emlist[例: IPアドレスの範囲オブジェクトの場合][ruby]{
require 'ipaddr'
Range.new(IPAddr.new("192.0.2.1"), IPAddr.new("192.0.2.3")).each {|ip| puts ip}
# => 192.0.2.1
# 19......のオブジェクトの場合][ruby]{
MyInteger = Struct.new(:value) do
def succ
self.class.new(value + 1)
end
def <=>(other)
value <=> other.value
end
def to_s
value.to_s
end
end
Range.new(MyInteger.new(1), MyInteger.new(3)).each {|i| puts i }
# => 1
# 2
# 3
//}... -
NEWS for Ruby 3
. 1 . 0 (12.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...0.3.0
* etc 1.3.0
* fcntl 1.0.1
* fiddle 1.1.0
* fileutils 1.6.0
* find 0.1.1
* io-console 0.5.10
* io-wait 0.2.1
* ipaddr 1.2.3
* irb 1.4.1
* json 2.6.1
* logger 1.5.0
* net-http 0.2.0
* net-protocol 0.1.2
* nkf 0.1.1
* open-uri 0.2.0......るようになりました。 https://github.com/ruby/rbs/pull/823
//emlist{
# Defines a generic type `list`.
type list[T] = [ T, list[T] ]
| nil
type str_list = list[String]
type int_list = list[Integer]
//}
* gemsのRBSを管理するためのrbs collectionコマンド(https://g... -
Pathname
. glob(pattern , flags=0) -> [Pathname] (7.0) -
ワイルドカードの展開を行なった結果を、 Pathname オブジェクトの配列として返します。
...@param pattern ワイルドカードパターンです
@param flags パターンマッチ時のふるまいを変化させるフラグを指定します
//emlist[][ruby]{
require "pathname"
Pathname.glob("lib/i*.rb") # => [#<Pathname:lib/ipaddr.rb>, #<Pathname:lib/irb.rb>]
//}
@see Dir.glob......イルドカードパターンです
@param flags パターンマッチ時のふるまいを変化させるフラグを指定します
//emlist[][ruby]{
require "pathname"
Pathname.glob("lib/i*.rb") # => [#<Pathname:lib/ipaddr.rb>, #<Pathname:lib/irb.rb>]
//}
@see Dir.glob
@see Pathname#glob...