るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. matrix each_with_index
  2. _builtin with_index
  3. mkmf with_werror
  4. mkmf with_config
  5. kernel with_werror

モジュール

キーワード

検索結果

<< 1 2 > >>

Enumerable#each_with_index(*args) -> Enumerator (18397.0)

要素とそのインデックスをブロックに渡して繰り返します。

要素とそのインデックスをブロックに渡して繰り返します。

ブロックを省略した場合は、
要素とそのインデックスを繰り返すような
Enumerator を返します。

Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)。

@param args イテレータメソッド (each など) にそのまま渡されます。

//emlist[例][ruby]{
[5, 10, 15].each_with_index do |n, idx|
p [n, idx]
end
#...

Enumerable#each_with_index(*args) {|item, index| ... } -> self (18397.0)

要素とそのインデックスをブロックに渡して繰り返します。

要素とそのインデックスをブロックに渡して繰り返します。

ブロックを省略した場合は、
要素とそのインデックスを繰り返すような
Enumerator を返します。

Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)。

@param args イテレータメソッド (each など) にそのまま渡されます。

//emlist[例][ruby]{
[5, 10, 15].each_with_index do |n, idx|
p [n, idx]
end
#...

Enumerator#with_index(offset = 0) -> Enumerator (18379.0)

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。
インデックスは offset から始まります。

ブロックを指定した場合の戻り値は生成時に指定したレシーバ自身です。

//emlist[例][ruby]{
str = "xyz"

enum = Enumerator.new {|y| str.each_byte {|b| y << b }}
enum.with_index {|byte, idx| p [byte, idx] }
# => [120, 0]
# [121, 1]
# [122, 2]

require "stringi...

Enumerator#with_index(offset = 0) {|(*args), idx| ... } -> object (18379.0)

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。
インデックスは offset から始まります。

ブロックを指定した場合の戻り値は生成時に指定したレシーバ自身です。

//emlist[例][ruby]{
str = "xyz"

enum = Enumerator.new {|y| str.each_byte {|b| y << b }}
enum.with_index {|byte, idx| p [byte, idx] }
# => [120, 0]
# [121, 1]
# [122, 2]

require "stringi...

Enumerator#with_object(obj) -> Enumerator (18379.0)

繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。

繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。

obj には任意のオブジェクトを渡すことができます。

ブロックが渡されなかった場合は、上で説明した繰り返しを実行し、
最後に obj を返す Enumerator を返します。

//emlist[例][ruby]{
# 0,1,2 と呼びだす enumeratorを作る
to_three = Enumerator.new do |y|
3.times do |x|
y << x
end
end

to_three_with_string = to_three.with_object...

絞り込み条件を変える

Enumerator#with_object(obj) {|(*args), memo_obj| ... } -> object (18379.0)

繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。

繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。

obj には任意のオブジェクトを渡すことができます。

ブロックが渡されなかった場合は、上で説明した繰り返しを実行し、
最後に obj を返す Enumerator を返します。

//emlist[例][ruby]{
# 0,1,2 と呼びだす enumeratorを作る
to_three = Enumerator.new do |y|
3.times do |x|
y << x
end
end

to_three_with_string = to_three.with_object...

REXML::Element#each_element_with_attribute(key, value = nil, max = 0, name = nil) {|element| ... } -> () (18376.0)

特定の属性を持つすべての子要素を引数としてブロックを呼び出します。

特定の属性を持つすべての子要素を引数としてブロックを呼び出します。

key で指定した属性名の属性を持つ要素のみを対象とします。
value を指定すると、keyで指定した属性名を持つ属性の値がvalueである
もののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対象となります。
name を指定すると、それは xpath 文字列と見なされ、
それにマッチするもののみが対象となります。

max に 0 を指定すると、max の指定は無視されます(0個ではありません)。

@param key 属性名(文字列)
@param value 属性値(文字列)
...

REXML::Element#each_element_with_text(text = nil, max = 0, name = nil) {|element| ... } -> () (18376.0)

テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。

テキストを子ノードとして
持つすべての子要素を引数としてブロックを呼び出します。

text を指定すると、テキストの内容が text であるもののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対象となります。
name を指定すると、それは xpath 文字列と見なされ、
それにマッチするもののみが対象となります。

max に 0 を指定すると、max の指定は無視されます(0個ではありません)。

@param text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列

...

String#end_with?(*strs) -> bool (18376.0)

self の末尾が strs のいずれかであるとき true を返します。

self の末尾が strs のいずれかであるとき true を返します。

@param strs パターンを表す文字列 (のリスト)

//emlist[例][ruby]{
"string".end_with?("ing") # => true
"string".end_with?("str") # => false
"string".end_with?("str", "ing") # => true
//}

@see String#start_with?

String#start_with?(*strs) -> bool (18376.0)

self の先頭が strs のいずれかであるとき true を返します。

self の先頭が strs のいずれかであるとき true を返します。

@param strs パターンを表す文字列 (のリスト)

//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "str") # => true
//}

@see String#end_with?

絞り込み条件を変える

Prime::PseudoPrimeGenerator#each_with_index -> Enumerator (18349.0)

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

@return ブロックを与えられた場合は self を返します。 ブロックを与えられなかった場合は Enumerator を返します。

//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}

@see Enumerator#with_ind...

Prime::PseudoPrimeGenerator#each_with_index {|prime, index| ... } -> self (18349.0)

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

@return ブロックを与えられた場合は self を返します。 ブロックを与えられなかった場合は Enumerator を返します。

//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}

@see Enumerator#with_ind...

Prime::PseudoPrimeGenerator#with_index -> Enumerator (18349.0)

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

@return ブロックを与えられた場合は self を返します。 ブロックを与えられなかった場合は Enumerator を返します。

//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}

@see Enumerator#with_ind...

Prime::PseudoPrimeGenerator#with_index {|prime, index| ... } -> self (18349.0)

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

@return ブロックを与えられた場合は self を返します。 ブロックを与えられなかった場合は Enumerator を返します。

//emlist[例][ruby]{
require 'prime'
Prime::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}

@see Enumerator#with_ind...

st_table * st_init_table_with_size(struct st_hash_type *type, int size) (18349.0)

st_table を作成する。_with_size はサイズを指定して生成する。 struct st_hash_type はハッシュ値を得る関数と、同値判定を行う 関数を持つ。

st_table を作成する。_with_size はサイズを指定して生成する。
struct st_hash_type はハッシュ値を得る関数と、同値判定を行う
関数を持つ。

絞り込み条件を変える

Enumerable#each_with_object(obj) -> Enumerator (18343.0)

与えられた任意のオブジェクトと要素をブロックに渡し繰り返し、最初に与えられたオブジェクトを返します。

与えられた任意のオブジェクトと要素をブロックに渡し繰り返し、最初に与えられたオブジェクトを返します。

ブロックを省略した場合は Enumerator を返します。

@param obj 任意のオブジェクトを指定します。

//emlist[例][ruby]{
evens = (1..10).each_with_object([]) {|i, a| a << i*2 }
# => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
//}

@see Enumerator#with_object

Enumerable#each_with_object(obj) {|(*args), memo_obj| ... } -> object (18343.0)

与えられた任意のオブジェクトと要素をブロックに渡し繰り返し、最初に与えられたオブジェクトを返します。

与えられた任意のオブジェクトと要素をブロックに渡し繰り返し、最初に与えられたオブジェクトを返します。

ブロックを省略した場合は Enumerator を返します。

@param obj 任意のオブジェクトを指定します。

//emlist[例][ruby]{
evens = (1..10).each_with_object([]) {|i, a| a << i*2 }
# => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
//}

@see Enumerator#with_object

Kernel#with_config(config, default = nil) -> bool | String (18343.0)

configure のオプションを検査します。

configure のオプションを検査します。

configure のオプションに --with-<config> が指定された場合は真を返しま
す。--without-<config> が指定された場合は偽を返します。どちらでもない場
合は default を返します。

これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。

@param config configure のオプションの名前を指定します。

@param default デフォルト値を返します。


require 'mkmf'
if with_config("debug")
$defs...

Kernel#with_config(config, default = nil) {|config, default| ... } -> bool | String (18343.0)

configure のオプションを検査します。

configure のオプションを検査します。

configure のオプションに --with-<config> が指定された場合は真を返しま
す。--without-<config> が指定された場合は偽を返します。どちらでもない場
合は default を返します。

これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。

@param config configure のオプションの名前を指定します。

@param default デフォルト値を返します。


require 'mkmf'
if with_config("debug")
$defs...

Gem::SourceInfoCache.search_with_source(*args) -> Array (18340.0)

与えられた条件を満たす Gem::Specification と URL のリストを返します。

与えられた条件を満たす Gem::Specification と URL のリストを返します。

@param args 検索条件を指定します。Gem::SourceInfoCache#search_with_source と引数を合わせてください。

@see Gem::SourceInfoCache#search_with_source

絞り込み条件を変える

Matrix#each_with_index(which = :all) -> Enumerator (18325.0)

行列の各要素をその位置とともに引数としてブロックを呼び出します。

行列の各要素をその位置とともに引数としてブロックを呼び出します。

which で処理する要素の範囲を指定することができます。
Matrix#each と同じなのでそちらを参照してください。

ブロックを省略した場合、 Enumerator を返します。

//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
puts "#{e} at #{row}, #{col}"
end
# => 1 at 0, 0
# => 2 at 0, 1
# => 3...

Matrix#each_with_index(which = :all) {|e, row, col| ... } -> self (18325.0)

行列の各要素をその位置とともに引数としてブロックを呼び出します。

行列の各要素をその位置とともに引数としてブロックを呼び出します。

which で処理する要素の範囲を指定することができます。
Matrix#each と同じなのでそちらを参照してください。

ブロックを省略した場合、 Enumerator を返します。

//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
puts "#{e} at #{row}, #{col}"
end
# => 1 at 0, 0
# => 2 at 0, 1
# => 3...

Prime::PseudoPrimeGenerator#with_object(obj) -> Enumerator (18325.0)

与えられた任意のオブジェクトと要素をブロックに渡して評価します。

与えられた任意のオブジェクトと要素をブロックに渡して評価します。

@param obj 任意のオブジェクトを指定します。
@return 最初に与えられたオブジェクトを返します。
@return ブロックを与えられた場合は obj を返します。ブロックを与えられなかった場合は Enumerator を返します。

@see Enumerator#with_object

Prime::PseudoPrimeGenerator#with_object(obj) {|prime, obj| ... } -> object (18325.0)

与えられた任意のオブジェクトと要素をブロックに渡して評価します。

与えられた任意のオブジェクトと要素をブロックに渡して評価します。

@param obj 任意のオブジェクトを指定します。
@return 最初に与えられたオブジェクトを返します。
@return ブロックを与えられた場合は obj を返します。ブロックを与えられなかった場合は Enumerator を返します。

@see Enumerator#with_object

IRB::Inspector.keys_with_inspector(inspector) -> Array (18322.0)

引数で指定した IRB::Inspector に対応する key の配列を返します。

引数で指定した IRB::Inspector に対応する key の配列を返します。

@param inspector IRB::Inspector オブジェクトを指定します。

IRB::Inspector.keys_with_inspector(IRB::Inspector::INSPECTORS[true])
# => [true, :p, "p", :inspect, "inspect"]

絞り込み条件を変える

Rake::TaskArguments#with_defaults(defaults) -> Hash (18322.0)

パラメータにデフォルト値をセットします。

パラメータにデフォルト値をセットします。

@param defaults デフォルト値として使用するキーと値を格納したハッシュを指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments.to_hash ...

Vector#angle_with(v) -> Float (18322.0)

v と self がなす角度を返します。

v と self がなす角度を返します。

//emlist[例][ruby]{
require 'matrix'
Vector[1, 0].angle_with(Vector[0, 1]) # => Math::PI/2
//}

@param v このベクトルと self とがなす角度を計算します
@raise ZeroVectorError self もしくは v のどちらかが零ベクトルである場合に
発生します
@raise ExceptionForMatrix::ErrDimensionMismatch v と self の
ベクトルの次元が異なる場合に発...

Kernel#with_werror(opt, opts = nil) {|opt, opts| ... } -> object (18307.0)

@todo 内部用?

@todo 内部用?

???

@param opt ????

@param opts ????

@return ブロックを評価した結果を返します。

Kernel#with_werror(opt, opts = nil) {|opt| ... } -> object (18307.0)

@todo 内部用?

@todo 内部用?

???

@param opt ????

@param opts ????

@return ブロックを評価した結果を返します。

DRb::DRbObject.new_with_uri(uri) -> DRb::DRbObject (18304.0)

URI から新しい DRbObject を生成します。

URI から新しい DRbObject を生成します。

別プロセスの DRb.#start_service で指定したフロントオブジェクトを
指すリモートオブジェクトを取り出します。

@param uri URI リモートオブジェクトを指定するための URI (文字列)

絞り込み条件を変える

Gem::DependencyInstaller#find_gems_with_sources(dep) -> Array (18304.0)

与えられた条件にマッチする Gem::Specification のインスタンスと URI のペアのリストを 返します。

与えられた条件にマッチする Gem::Specification のインスタンスと URI のペアのリストを
返します。

Gem はローカル (Dir.pwd) とリモート (Gem.sources) の両方から検索します。
結果は、バージョンの新しい順が先にきます。また、ローカルの Gem も先にきます。

@param dep Gem::Dependency のインスタンスを指定します。

Gem::SourceInfoCache#search_with_source(pattern, only_platform = false, all = false) -> Array (18304.0)

与えられた条件を満たす Gem::Specification と URL のリストを返します。

与えられた条件を満たす Gem::Specification と URL のリストを返します。

@param pattern 検索したい Gem を表す Gem::Dependency のインスタンスを指定します。

@param only_platform 真を指定するとプラットフォームが一致するもののみを返します。デフォルトは偽です。

@param all 真を指定するとキャッシュを更新してから検索を実行します。

@return 第一要素を Gem::Specification、第二要素を取得元の URL とする配列を要素とする配列を返します。

REXML::Child#replace_with(child) -> self (18304.0)

親ノードの子ノード列上において、 self を child に置き換えます。

親ノードの子ノード列上において、 self を child に置き換えます。

@param child 置き換え後のノード
@see REXML::Parent#replace_child

Rake::TaskManager#enhance_with_matching_rule(task_name, level = 0) -> Rake::Task | nil (18304.0)

与えられたタスク名にマッチしたルールが存在する場合は、そのタスクに見つかったルールの 事前タスクとアクションを追加して返します。

与えられたタスク名にマッチしたルールが存在する場合は、そのタスクに見つかったルールの
事前タスクとアクションを追加して返します。

@param task_name タスクの名前を指定します。

@param level 現在のルール解決のネストの深さを指定します。

@raise RuntimeError ルールの解決時にオーバーフローした場合に発生します。

WIN32OLE_EVENT#on_event_with_outargs(event = nil) {|*args| ... } -> () (18304.0)

イベント通知を受けて結果を呼び出し元へ返すブロックを登録します。

イベント通知を受けて結果を呼び出し元へ返すブロックを登録します。

引数にはイベントのメソッド名を指定します。引数を省略した場合は、すべて
のイベントを対象とするブロックの登録となります。

WIN32OLE_EVENT#on_eventと異なり、イベントのブロック変数に戻り値を
設定できます。

@param event イベント名を文字列かシンボルで指定します。イベント名は大文
字小文字を区別します。省略時にはすべてのイベントが対象となります。

@param args サーバがイベント通知時に指定した引数の配列です。
eventパラメータ...

絞り込み条件を変える

VALUE rb_with_disable_interrupt(VALUE (*proc)(), data) (18301.0)

st_table * st_init_numtable_with_size(int size) (18301.0)

キーが int 型であるハッシュテーブルを作成する。 st_init_table() に int 用の操作関数を渡しているだけ。

キーが int 型であるハッシュテーブルを作成する。
st_init_table() に int 用の操作関数を渡しているだけ。

st_table * st_init_strtable_with_size(int size) (18301.0)

キーが char* 型であるハッシュテーブルを作成する。 st_init_table に文字列用の操作関数を渡しているだけ。

キーが char* 型であるハッシュテーブルを作成する。
st_init_table に文字列用の操作関数を渡しているだけ。

void rb_compile_error_with_enc(const char *file, int line, void *enc, const char *fmt, ...) (18301.0)

この関数は Ruby 2.3.0 から deprecated です。公開関数ですが内部利用のみを想 定しています。外部のライブラリで使用すべきではありません。

この関数は Ruby 2.3.0 から deprecated です。公開関数ですが内部利用のみを想
定しています。外部のライブラリで使用すべきではありません。

Pathname#each_child(with_directory = true) -> Enumerator (373.0)

self.children(with_directory).each と同じです。

self.children(with_directory).each と同じです。

@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

//emlist[例][ruby]{
require "pathname"

Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname:/usr/local/etc>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/us...

絞り込み条件を変える

Pathname#each_child(with_directory = true) {|pathname| ...} -> [Pathname] (373.0)

self.children(with_directory).each と同じです。

self.children(with_directory).each と同じです。

@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

//emlist[例][ruby]{
require "pathname"

Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname:/usr/local/etc>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/us...

Pathname#children(with_directory = true) -> [Pathname] (322.0)

self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。

self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。

ただし、 ".", ".." は要素に含まれません。

@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

@raise Errno::EXXX self が存在しないパスであったりディレクトリでなければ例外が発生します。

//emlist[例][ruby]{
require 'pathname'
Pathname.new("/tmp").children # => [#<Pathname:.X11-unix>, #<Pathname:.iroha_unix>...

Kernel#dir_config(target, idefault = nil, ldefault = nil) -> [String, String] (253.0)

configure オプション --with-TARGET-dir, --with-TARGET-include, --with-TARGET-lib をユーザが extconf.rb に指定できるようにします。

configure オプション
--with-TARGET-dir,
--with-TARGET-include,
--with-TARGET-lib
をユーザが extconf.rb に指定できるようにします。

--with-TARGET-dir オプションは
システム標準ではない、
ヘッダファイルやライブラリがあるディレクトリをまとめて指定するために使います。
ユーザが extconf.rb に --with-TARGET-dir=PATH を指定したときは
$CFLAGS に "-IPATH/include" を、
$LDFLAGS に "-LPATH/lib" を、
それぞれ追加し...

NEWS for Ruby 2.0.0 (181.0)

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

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

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

== 1.9.3 以降の変更

=== 言語仕様の変更

* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加しました。(%w, %W に似ています)
* デフォルトのソースエンコーディングを US-ASCI...

mkmf (181.0)

Ruby の拡張ライブラリのための Makefile を作成するライブラリです。

Ruby の拡張ライブラリのための Makefile を作成するライブラリです。

このライブラリは通常、extconf.rb という名前の ruby スクリプトから require されます。
この extconf.rb を実行して Makefile を作成するのが慣習です。

extconf.rb の書きかたについては、
Ruby のアーカイブに含まれる doc/extension.rdoc (日本語版は doc/extension.ja.rdoc)
も参照してください。

このライブラリでは extconf.rb を記述するのに有用なメソッドを定義しています。
ヘッダファイルの存在チェッ...

絞り込み条件を変える

パターンマッチ (145.0)

パターンマッチ * patterns * variable_binding * variable_pinning * matching_non_primitive_objects * guard_clauses * current_feature_status * pattern_syntax * some_undefined_behavior_examples

パターンマッチ
* patterns
* variable_binding
* variable_pinning
* matching_non_primitive_objects
* guard_clauses
* current_feature_status
* pattern_syntax
* some_undefined_behavior_examples

パターンマッチは、構造化された値に対して、構造をチェックし、マッチした部分をローカル変数に束縛するという、深いマッチを可能にする実験的な機能です。(『束縛』は、パターンマッチの輸入元である関数型言語...

ruby 1.8.4 feature (127.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

ruby 1.8.4 feature
ruby 1.8.4 での ruby 1.8.3 からの変更点です。

掲載方針

*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。

以下は各変更点に付けるべきタグです。

記号について(特に重要なものは大文字(主観))

# * カテゴリ
# * [ruby]: ruby インタプリタの変更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加され...

Module#ruby2_keywords(method_name, ...) -> nil (115.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

For the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword argument...

Kernel#convertible_int(type, headers = nil, opts = nil) (97.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are p...

Kernel#convertible_int(type, headers = nil, opts = nil) { ... } (97.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are p...

絞り込み条件を変える

Method (73.0)

Object#method によりオブジェクト化され たメソッドオブジェクトのクラスです。

Object#method によりオブジェクト化され
たメソッドオブジェクトのクラスです。

メソッドの実体(名前でなく)とレシーバの組を封入します。
Proc オブジェクトと違ってコンテキストを保持しません。

=== Proc との差

Method は取り出しの対象であるメソッドが
なければ作れませんが、Proc は準備なしに作れます。その点から
Proc は使い捨てに向き、Method は何度も繰り返し生成する
場合に向くと言えます。また内包するコードの大きさという点では
Proc は小規模、Method は大規模コードに向くと言えます。


既存のメソッドを Method オブジェク...

NEWS for Ruby 2.3.0 (73.0)

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

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

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

== 2.2.0 以降の変更

=== 言語仕様の変更

* frozen-string-literal プラグマ:
* 実験的な機能として fronzen-string-literal というプラグマが導入されました。
897...

Time#strftime(format) -> String (73.0)

時刻を format 文字列に従って文字列に変換した結果を返します。

時刻を format 文字列に従って文字列に変換した結果を返します。

@param format フォーマット文字列を指定します。使用できるものは 以下の通りです。

* %A: 曜日の名称(Sunday, Monday ... )
* %a: 曜日の省略名(Sun, Mon ... )
* %B: 月の名称(January, February ... )
* %b: 月の省略名(Jan, Feb ... )
* %C: 世紀 (2009年であれば 20)
* %c: 日付と時刻 (%a %b %e %T %Y)
* %D: 日付 (%m/%d/%y)
* ...

Marshal フォーマット (55.0)

Marshal フォーマット フォーマットバージョン 4.8 を元に記述しています。

Marshal フォーマット
フォーマットバージョン 4.8 を元に記述しています。

=== nil, true, false

それぞれ、'0', 'T', 'F' になります。

//emlist[][ruby]{
p Marshal.dump(nil).unpack1("x2 a*") # => "0"
p Marshal.dump(true).unpack1("x2 a*") # => "T"
p Marshal.dump(false).unpack1("x2 a*") # => "F"
//}

Ruby 2.1 以前では、インスタンス変数を設定しても dump されません...

Method#[](*args) -> object (55.0)

メソッドオブジェクトに封入されているメソッドを起動します。

メソッドオブジェクトに封入されているメソッドを起動します。

引数やブロックはそのままメソッドに渡されます。

self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。


@param args self に渡される引数。

@see spec/safelevel

//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end

m = Foo.new.met...

絞り込み条件を変える

Method#call(*args) -> object (55.0)

メソッドオブジェクトに封入されているメソッドを起動します。

メソッドオブジェクトに封入されているメソッドを起動します。

引数やブロックはそのままメソッドに渡されます。

self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。


@param args self に渡される引数。

@see spec/safelevel

//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end

m = Foo.new.met...

Method#call(*args) { ... } -> object (55.0)

メソッドオブジェクトに封入されているメソッドを起動します。

メソッドオブジェクトに封入されているメソッドを起動します。

引数やブロックはそのままメソッドに渡されます。

self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。


@param args self に渡される引数。

@see spec/safelevel

//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end

m = Foo.new.met...

did_you_mean (55.0)

名前のタイポによって NameError や NoMethodError が起きたと きに、自動的に他の似た名前を提案してくれるライブラリです。

名前のタイポによって NameError や NoMethodError が起きたと
きに、自動的に他の似た名前を提案してくれるライブラリです。

"Yuki".starts_with?("Y")
# => NoMethodError: undefined method `starts_with?' for "Yuki":String
# Did you mean? start_with?

デフォルトで有効になっており、無効にするにはコマンドラインオプションで
--disable=did_you_mean を指定します。

このライブラリはbundled gem(gemフ...

rubygems/security (55.0)

このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。

このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。

=== 署名付きの Gem パッケージ

==== 目次

* 概要
* 解説
* コマンドラインオプション
* OpenSSL リファレンス
* Bugs / TODO
* 作者について

==== 概要

このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。
以下のセクションでは、署名付きの Gem パッケージを作成する方法を
ステップバイステップで解説しています。

==== 解説
@todo メソッドではない

あなたが自分の Gem に署名するためには、...

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (49.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

絞り込み条件を変える

Kernel#check_signedness(type, headers = nil, opts = nil) { ... } -> "signed" | "unsigned" | nil (49.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

Socket::AI_PASSIVE -> Integer (49.0)

Get address to use with bind。

Get address to use with bind。

Socket.getaddrinfo, Addrinfo.getaddrinfo の引数 flags に渡す
定数です。

@see getaddrinfo(3)

Socket::Constants::AI_PASSIVE -> Integer (49.0)

Get address to use with bind。

Get address to use with bind。

Socket.getaddrinfo, Addrinfo.getaddrinfo の引数 flags に渡す
定数です。

@see getaddrinfo(3)

Socket::Constants::EAI_NODATA -> Integer (49.0)

No address associated with hostname

No address associated with hostname

getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。

@see getaddrinfo(3linux)

Socket::Constants::IFF_DYNAMIC (49.0)

dialup device with changing addresses

dialup device with changing addresses

絞り込み条件を変える

Socket::Constants::IPV6_PKTINFO -> Integer (49.0)

Receive packet information with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive packet information with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
ip6(4freebsd), ipv6(7linux),
3542

Socket::Constants::IPV6_RECVHOPLIMIT -> Integer (49.0)

Receive hop limit with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive hop limit with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
3542

Socket::Constants::IPV6_RECVPATHMTU -> Integer (49.0)

Receive current path MTU with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive current path MTU with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
3542

Socket::Constants::IP_BLOCK_SOURCE -> Integer (49.0)

Block IPv4 multicast packets with a give source address。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Block IPv4 multicast packets with a give source address。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(4freebsd)

Socket::Constants::IP_HDRINCL -> Integer (49.0)

Header is included with data。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Header is included with data。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(4freebsd)

絞り込み条件を変える

Socket::Constants::IP_PASSSEC -> Integer (49.0)

@todo Retrieve security context with datagram。

@todo
Retrieve security context with datagram。

Socket::Constants::IP_PKTINFO -> Integer (49.0)

Receive packet information with datagrams。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive packet information with datagrams。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP, ip(7linux)

Socket::Constants::IP_PKTOPTIONS -> Integer (49.0)

@todo Receive packet options with datagrams

@todo
Receive packet options with datagrams

Socket::Constants::IP_PORTRANGE -> Integer (49.0)

Set the port range for sockets with unspecified port numbers。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Set the port range for sockets with unspecified port numbers。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP, ip(4freebsd)

Socket::Constants::IP_RECVDSTADDR -> Integer (49.0)

Receive IP destination address with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive IP destination address with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(4freebsd)

絞り込み条件を変える

Socket::Constants::IP_RECVIF -> Integer (49.0)

Receive interface information with datagrams。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive interface information with datagrams。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP, ip(4freebsd)

Socket::Constants::IP_RECVOPTS -> Integer (49.0)

Receive IP destination address with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive IP destination address with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(7linux)

Socket::Constants::IP_RECVSLLA -> Integer (49.0)

@todo Receive link-layer address with datagrams

@todo
Receive link-layer address with datagrams

Socket::Constants::IP_RECVTOS -> Integer (49.0)

Receive TOS with incoming packets。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive TOS with incoming packets。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP, ip(7linux)

Socket::Constants::IP_RECVTTL -> Integer (49.0)

Receive IP TTL with datagrams。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive IP TTL with datagrams。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP, ip(7linux), ip(4freebsd)

絞り込み条件を変える

Socket::Constants::IP_UNBLOCK_SOURCE -> Integer (49.0)

Unblock IPv4 multicast packets with a give source address。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Unblock IPv4 multicast packets with a give source address。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(4freebsd)

Socket::Constants::SO_RECVUCRED -> Integer (49.0)

@todo Receive user credentials with datagram。

@todo
Receive user credentials with datagram。

Socket::Constants::SO_TIMESTAMP -> Integer (49.0)

Receive timestamp with datagrams (timeval)。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive timestamp with datagrams (timeval)。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see getsockopt(2freebsd),
socket(7linux), Socket::Constants::SOL_SOCKET
Socket::AncillaryData#timestamp

Socket::Constants::SO_TIMESTAMPNS -> Integer (49.0)

@todo Receive nanosecond timestamp with datagrams (timespec)。

@todo
Receive nanosecond timestamp with datagrams (timespec)。

@see Socket::Constants::SO_TIMESTAMP,
Socket::AncillaryData#timestamp

Socket::EAI_NODATA -> Integer (49.0)

No address associated with hostname

No address associated with hostname

getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。

@see getaddrinfo(3linux)

絞り込み条件を変える

Socket::IFF_DYNAMIC (49.0)

dialup device with changing addresses

dialup device with changing addresses

Socket::IPV6_PKTINFO -> Integer (49.0)

Receive packet information with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive packet information with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
ip6(4freebsd), ipv6(7linux),
3542

Socket::IPV6_RECVHOPLIMIT -> Integer (49.0)

Receive hop limit with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive hop limit with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
3542

Socket::IPV6_RECVPATHMTU -> Integer (49.0)

Receive current path MTU with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive current path MTU with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
3542

Socket::IP_BLOCK_SOURCE -> Integer (49.0)

Block IPv4 multicast packets with a give source address。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Block IPv4 multicast packets with a give source address。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(4freebsd)

絞り込み条件を変える

Socket::IP_HDRINCL -> Integer (49.0)

Header is included with data。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Header is included with data。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(4freebsd)

Socket::IP_PASSSEC -> Integer (49.0)

@todo Retrieve security context with datagram。

@todo
Retrieve security context with datagram。

Socket::IP_PKTINFO -> Integer (49.0)

Receive packet information with datagrams。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive packet information with datagrams。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP, ip(7linux)

Socket::IP_PKTOPTIONS -> Integer (49.0)

@todo Receive packet options with datagrams

@todo
Receive packet options with datagrams

Socket::IP_PORTRANGE -> Integer (49.0)

Set the port range for sockets with unspecified port numbers。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Set the port range for sockets with unspecified port numbers。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP, ip(4freebsd)

絞り込み条件を変える

Socket::IP_RECVDSTADDR -> Integer (49.0)

Receive IP destination address with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive IP destination address with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(4freebsd)

Socket::IP_RECVIF -> Integer (49.0)

Receive interface information with datagrams。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive interface information with datagrams。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP, ip(4freebsd)

Socket::IP_RECVOPTS -> Integer (49.0)

Receive IP destination address with datagram。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive IP destination address with datagram。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(7linux)

Socket::IP_RECVSLLA -> Integer (49.0)

@todo Receive link-layer address with datagrams

@todo
Receive link-layer address with datagrams

Socket::IP_RECVTOS -> Integer (49.0)

Receive TOS with incoming packets。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

Receive TOS with incoming packets。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP, ip(7linux)

絞り込み条件を変える

<< 1 2 > >>