ライブラリ
- ビルトイン (42)
- base64 (2)
- continuation (1)
- csv (1)
-
irb
/ inspector (1) - matrix (7)
- mkmf (7)
- pathname (3)
- prime (6)
- psych (2)
- rake (3)
-
rexml
/ document (3) -
rinda
/ tuplespace (1) -
rubygems
/ dependency _ installer (1) -
rubygems
/ source _ info _ cache (2) - shellwords (1)
- socket (34)
- syslog (2)
- win32ole (2)
クラス
- CSV (1)
- Enumerator (4)
-
Gem
:: DependencyInstaller (1) -
Gem
:: SourceInfoCache (2) - Hash (8)
- IO (10)
-
IRB
:: Inspector (1) - Matrix (6)
- Pathname (3)
-
Prime
:: PseudoPrimeGenerator (6) -
REXML
:: Child (1) -
REXML
:: Element (2) -
Rake
:: TaskArguments (1) - Socket (12)
- String (3)
- Thread (4)
- Time (1)
- Vector (1)
-
WIN32OLE
_ EVENT (2)
モジュール
- Base64 (2)
- Enumerable (9)
- FileUtils (1)
- Kernel (8)
- Marshal (2)
- Psych (2)
-
Rake
:: TaskManager (1) - Shellwords (1)
-
Socket
:: Constants (22) - Syslog (2)
キーワード
-
AI
_ PASSIVE (2) - Continuation (1)
-
EAI
_ NODATA (2) -
IFF
_ DYNAMIC (2) -
IPV6
_ PKTINFO (1) -
IPV6
_ RECVHOPLIMIT (1) -
IPV6
_ RECVPATHMTU (2) -
IP
_ BLOCK _ SOURCE (2) -
IP
_ HDRINCL (1) -
IP
_ PASSSEC (2) -
IP
_ PKTINFO (1) -
IP
_ PKTOPTIONS (1) -
IP
_ PORTRANGE (2) -
IP
_ RECVDSTADDR (2) -
IP
_ RECVIF (1) -
IP
_ RECVOPTS (1) -
IP
_ RECVSLLA (2) -
IP
_ RECVTOS (1) -
IP
_ RECVTTL (1) -
IP
_ UNBLOCK _ SOURCE (2) - Marshal フォーマット (1)
-
NEWS for Ruby 2
. 0 . 0 (1) - Rubyの起動 (1)
-
SO
_ RECVUCRED (1) -
SO
_ TIMESTAMP (2) -
SO
_ TIMESTAMPNS (2) - TupleSpace (1)
-
angle
_ with (1) - build (2)
-
check
_ signedness (2) - children (1)
-
convertible
_ int (2) -
did
_ you _ mean (1) -
dir
_ config (1) - dump (4)
- each (2)
-
each
_ child (2) -
each
_ element _ with _ attribute (1) -
each
_ element _ with _ text (1) -
each
_ with _ index (6) -
each
_ with _ object (2) -
enhance
_ with _ matching _ rule (1) - exit (1)
-
find
_ gems _ with _ sources (1) -
keep
_ if (2) -
keys
_ with _ inspector (1) - mask (1)
- mask= (1)
-
max
_ by (4) - new (3)
-
on
_ event (1) -
on
_ event _ with _ outargs (1) - popen (10)
-
rb
_ compile _ error _ with _ enc (1) -
rb
_ with _ disable _ interrupt (1) - rdoc (1)
-
rdoc
/ generator / json _ index (1) -
replace
_ with (1) -
report
_ on _ exception (2) -
report
_ on _ exception= (2) -
ruby 1
. 6 feature (1) -
ruby 1
. 8 . 2 feature (1) -
ruby 1
. 8 . 4 feature (1) -
rubygems
/ commands / generate _ index _ command (1) -
rubygems
/ commands / pristine _ command (1) -
rubygems
/ security (1) -
search
_ with _ source (2) - select! (2)
- sh (1)
- shelljoin (1)
-
st
_ init _ numtable _ with _ size (1) -
st
_ init _ strtable _ with _ size (1) -
st
_ init _ table _ with _ size (1) -
start
_ with? (1) - strftime (1)
-
to
_ h (1) -
transform
_ values (2) -
transform
_ values! (2) -
urlsafe
_ decode64 (1) -
urlsafe
_ encode64 (1) -
with
_ config (2) -
with
_ defaults (1) -
with
_ index (4) -
with
_ object (4) - パターンマッチ (1)
- 字句構造 (1)
- 正規表現 (1)
検索結果
先頭5件
- Prime
:: PseudoPrimeGenerator # each _ with _ index -> Enumerator - Prime
:: PseudoPrimeGenerator # each _ with _ index {|prime , index| . . . } -> self - st
_ table * st _ init _ table _ with _ size(struct st _ hash _ type *type , int size) - Gem
:: SourceInfoCache . search _ with _ source(*args) -> Array - st
_ table * st _ init _ numtable _ with _ size(int size)
-
Prime
:: PseudoPrimeGenerator # each _ with _ index -> Enumerator (63949.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 (63949.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) (55549.0) -
st_table を作成する。_with_size はサイズを指定して生成する。 struct st_hash_type はハッシュ値を得る関数と、同値判定を行う 関数を持つ。
st_table を作成する。_with_size はサイズを指定して生成する。
struct st_hash_type はハッシュ値を得る関数と、同値判定を行う
関数を持つ。 -
Gem
:: SourceInfoCache . search _ with _ source(*args) -> Array (55540.0) -
与えられた条件を満たす Gem::Specification と URL のリストを返します。
与えられた条件を満たす Gem::Specification と URL のリストを返します。
@param args 検索条件を指定します。Gem::SourceInfoCache#search_with_source と引数を合わせてください。
@see Gem::SourceInfoCache#search_with_source -
st
_ table * st _ init _ numtable _ with _ size(int size) (55501.0) -
キーが int 型であるハッシュテーブルを作成する。 st_init_table() に int 用の操作関数を渡しているだけ。
キーが int 型であるハッシュテーブルを作成する。
st_init_table() に int 用の操作関数を渡しているだけ。 -
st
_ table * st _ init _ strtable _ with _ size(int size) (55501.0) -
キーが char* 型であるハッシュテーブルを作成する。 st_init_table に文字列用の操作関数を渡しているだけ。
キーが char* 型であるハッシュテーブルを作成する。
st_init_table に文字列用の操作関数を渡しているだけ。 -
Enumerable
# each _ with _ index(*args) {|item , index| . . . } -> self (55333.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
#... -
Rake
:: TaskArguments # with _ defaults(defaults) -> Hash (55222.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 ... -
Gem
:: SourceInfoCache # search _ with _ source(pattern , only _ platform = false , all = false) -> Array (55204.0) -
与えられた条件を満たす Gem::Specification と URL のリストを返します。
与えられた条件を満たす Gem::Specification と URL のリストを返します。
@param pattern 検索したい Gem を表す Gem::Dependency のインスタンスを指定します。
@param only_platform 真を指定するとプラットフォームが一致するもののみを返します。デフォルトは偽です。
@param all 真を指定するとキャッシュを更新してから検索を実行します。
@return 第一要素を Gem::Specification、第二要素を取得元の URL とする配列を要素とする配列を返します。 -
WIN32OLE
_ EVENT # on _ event _ with _ outargs(event = nil) {|*args| . . . } -> () (55204.0) -
イベント通知を受けて結果を呼び出し元へ返すブロックを登録します。
イベント通知を受けて結果を呼び出し元へ返すブロックを登録します。
引数にはイベントのメソッド名を指定します。引数を省略した場合は、すべて
のイベントを対象とするブロックの登録となります。
WIN32OLE_EVENT#on_eventと異なり、イベントのブロック変数に戻り値を
設定できます。
@param event イベント名を文字列かシンボルで指定します。イベント名は大文
字小文字を区別します。省略時にはすべてのイベントが対象となります。
@param args サーバがイベント通知時に指定した引数の配列です。
eventパラメータ... -
VALUE rb
_ with _ disable _ interrupt(VALUE (*proc)() , data) (55201.0) -
-
Enumerable
# each _ with _ index(*args) -> Enumerator (55033.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 _ object(obj) -> Enumerator (55015.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 (55015.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 -
REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () (55012.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| . . . } -> () (55012.0) -
テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。
テキストを子ノードとして
持つすべての子要素を引数としてブロックを呼び出します。
text を指定すると、テキストの内容が text であるもののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対象となります。
name を指定すると、それは xpath 文字列と見なされ、
それにマッチするもののみが対象となります。
max に 0 を指定すると、max の指定は無視されます(0個ではありません)。
@param text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
... -
String
# start _ with?(*strs) -> bool (54976.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 # with _ index -> Enumerator (54949.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... -
Matrix
# each _ with _ index(which = :all) -> Enumerator (54925.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 (54925.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 (54925.0) -
与えられた任意のオブジェクトと要素をブロックに渡して評価します。
与えられた任意のオブジェクトと要素をブロックに渡して評価します。
@param obj 任意のオブジェクトを指定します。
@return 最初に与えられたオブジェクトを返します。
@return ブロックを与えられた場合は obj を返します。ブロックを与えられなかった場合は Enumerator を返します。
@see Enumerator#with_object -
Vector
# angle _ with(v) -> Float (54922.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 の
ベクトルの次元が異なる場合に発... -
Gem
:: DependencyInstaller # find _ gems _ with _ sources(dep) -> Array (54904.0) -
与えられた条件にマッチする Gem::Specification のインスタンスと URI のペアのリストを 返します。
与えられた条件にマッチする Gem::Specification のインスタンスと URI のペアのリストを
返します。
Gem はローカル (Dir.pwd) とリモート (Gem.sources) の両方から検索します。
結果は、バージョンの新しい順が先にきます。また、ローカルの Gem も先にきます。
@param dep Gem::Dependency のインスタンスを指定します。 -
REXML
:: Child # replace _ with(child) -> self (54904.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 (54904.0) -
与えられたタスク名にマッチしたルールが存在する場合は、そのタスクに見つかったルールの 事前タスクとアクションを追加して返します。
与えられたタスク名にマッチしたルールが存在する場合は、そのタスクに見つかったルールの
事前タスクとアクションを追加して返します。
@param task_name タスクの名前を指定します。
@param level 現在のルール解決のネストの深さを指定します。
@raise RuntimeError ルールの解決時にオーバーフローした場合に発生します。 -
Prime
:: PseudoPrimeGenerator # with _ index {|prime , index| . . . } -> self (54649.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 _ object(obj) {|prime , obj| . . . } -> object (54625.0) -
与えられた任意のオブジェクトと要素をブロックに渡して評価します。
与えられた任意のオブジェクトと要素をブロックに渡して評価します。
@param obj 任意のオブジェクトを指定します。
@return 最初に与えられたオブジェクトを返します。
@return ブロックを与えられた場合は obj を返します。ブロックを与えられなかった場合は Enumerator を返します。
@see Enumerator#with_object -
rubygems
/ commands / generate _ index _ command (54091.0) -
ある Gem サーバに対するインデックスを作成するためのライブラリです。
ある Gem サーバに対するインデックスを作成するためのライブラリです。
Usage: gem generate_index [options]
Options:
-d, --directory=DIRNAME repository base dir containing gems subdir
Common Options:
-h, --help このコマンドのヘルプを表示します
-V, --[no-]verbose 表示を詳細にします
... -
rubygems
/ commands / pristine _ command (54019.0) -
インストールされている Gem パッケージを初期状態にするためのライブラリです。
インストールされている Gem パッケージを初期状態にするためのライブラリです。
Usage: gem pristine [args] [options]
Options:
--all インストールされている全ての Gem パッケージを
初期状態に戻します
-v, --version VERSION 指定したバージョンの Gem パッケージを
... -
Enumerator
# with _ index(offset = 0) -> Enumerator (46015.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 (46015.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 (45979.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 (45979.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... -
Socket
:: Constants :: IP _ PORTRANGE -> Integer (45649.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) -
void rb
_ compile _ error _ with _ enc(const char *file , int line , void *enc , const char *fmt , . . . ) (37501.0) -
この関数は Ruby 2.3.0 から deprecated です。公開関数ですが内部利用のみを想 定しています。外部のライブラリで使用すべきではありません。
この関数は Ruby 2.3.0 から deprecated です。公開関数ですが内部利用のみを想
定しています。外部のライブラリで使用すべきではありません。 -
Kernel
# with _ config(config , default = nil) {|config , default| . . . } -> bool | String (37243.0) -
configure のオプションを検査します。
configure のオプションを検査します。
configure のオプションに --with-<config> が指定された場合は真を返しま
す。--without-<config> が指定された場合は偽を返します。どちらでもない場
合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例
require 'mkmf'
if with_config("debug")
$defs... -
Pathname
# each _ child(with _ directory = true) -> Enumerator (36973.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] (36973.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... -
Kernel
# with _ config(config , default = nil) -> bool | String (36943.0) -
configure のオプションを検査します。
configure のオプションを検査します。
configure のオプションに --with-<config> が指定された場合は真を返しま
す。--without-<config> が指定された場合は偽を返します。どちらでもない場
合は default を返します。
これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。
@param config configure のオプションの名前を指定します。
@param default デフォルト値を返します。
例
require 'mkmf'
if with_config("debug")
$defs... -
IRB
:: Inspector . keys _ with _ inspector(inspector) -> Array (36922.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"] -
Socket
:: AI _ PASSIVE -> Integer (36649.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 (36649.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 (36649.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 (36649.0) -
dialup device with changing addresses
dialup device with changing addresses -
Socket
:: Constants :: IPV6 _ RECVPATHMTU -> Integer (36649.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 _ PASSSEC -> Integer (36649.0) -
@todo Retrieve security context with datagram。
@todo
Retrieve security context with datagram。 -
Socket
:: Constants :: IP _ RECVDSTADDR -> Integer (36649.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 _ RECVSLLA -> Integer (36649.0) -
@todo Receive link-layer address with datagrams
@todo
Receive link-layer address with datagrams -
Socket
:: Constants :: SO _ TIMESTAMP -> Integer (36649.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 (36649.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 (36649.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 (36649.0) -
dialup device with changing addresses
dialup device with changing addresses -
Socket
:: IPV6 _ RECVPATHMTU -> Integer (36649.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 _ PASSSEC -> Integer (36649.0) -
@todo Retrieve security context with datagram。
@todo
Retrieve security context with datagram。 -
Socket
:: IP _ PORTRANGE -> Integer (36649.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 (36649.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 _ RECVSLLA -> Integer (36649.0) -
@todo Receive link-layer address with datagrams
@todo
Receive link-layer address with datagrams -
Socket
:: SO _ TIMESTAMP -> Integer (36649.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
:: SO _ TIMESTAMPNS -> Integer (36649.0) -
@todo Receive nanosecond timestamp with datagrams (timespec)。
@todo
Receive nanosecond timestamp with datagrams (timespec)。
@see Socket::Constants::SO_TIMESTAMP,
Socket::AncillaryData#timestamp -
rdoc
/ generator / json _ index (36199.0) -
他のジェネレータが生成する HTML で検索が行えるように、JSON の検索インデッ クスを生成するサブライブラリです。
他のジェネレータが生成する HTML で検索が行えるように、JSON の検索インデッ
クスを生成するサブライブラリです。
This generator is derived from sdoc by Vladimir Kolesnikov and
contains verbatim code written by him.
このジェネレータは HTML ジェネレータと一緒に使うために設計されています。:
class RDoc::Generator::Darkfish
def initialize options
# ...
@base_dir = Pa... -
did
_ you _ mean (36055.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フ... -
Continuation (36019.0)
-
継続を表すクラスです。
継続を表すクラスです。
Kernel.#callcc { |cont| ... } の呼び出し
は、直前の状態(ローカル変数の定義、スタックフレーム)を cont に記憶
してブロックを実行します。cont は、Continuation クラスのインスタ
ンスで、Continuation#call メソッドを実行するこ
とでいつでも記憶した状態を継続することができます。
C 言語の setjmp()/longjmp() がわかる人は
setjmp() == callcc {|c| }
longjmp() == c.call
と考えれば、わかりやすいかも知れません(ただし、callc... -
パターンマッチ (28279.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
パターンマッチは、構造化された値に対して、構造をチェックし、マッチした部分をローカル変数に束縛するという、深いマッチを可能にする実験的な機能です。(『束縛』は、パターンマッチの輸入元である関数型言語... -
Pathname
# children(with _ directory = true) -> [Pathname] (27922.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>... -
Time
# strftime(format) -> String (27817.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)
* ... -
Hash
# keep _ if -> Enumerator (27745.0) -
キーと値を引数としてブロックを評価した結果が真であるような要素を self に残します。
キーと値を引数としてブロックを評価した結果が真であるような要素を self
に残します。
keep_if は常に self を返します。
select! はオブジェクトが変更された場合に self を、
されていない場合に nil を返します。
ブロックが与えられなかった場合は、自身と keep_if から生成した
Enumerator オブジェクトを返します。
//emlist[例][ruby]{
h1 = {}
c = ("a".."g")
c.each_with_index {|e, i| h1[i] = e }
h2 = h1.dup
h1.select! # => #<E... -
Hash
# keep _ if {|key , value| . . . } -> self (27745.0) -
キーと値を引数としてブロックを評価した結果が真であるような要素を self に残します。
キーと値を引数としてブロックを評価した結果が真であるような要素を self
に残します。
keep_if は常に self を返します。
select! はオブジェクトが変更された場合に self を、
されていない場合に nil を返します。
ブロックが与えられなかった場合は、自身と keep_if から生成した
Enumerator オブジェクトを返します。
//emlist[例][ruby]{
h1 = {}
c = ("a".."g")
c.each_with_index {|e, i| h1[i] = e }
h2 = h1.dup
h1.select! # => #<E... -
Thread
# report _ on _ exception=(newstate) (27691.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
デフォルトはスレッド作成時の Thread.report_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Th... -
Matrix
# each(which = :all) -> Enumerator (27637.0) -
行列の各要素を引数としてブロックを呼び出します。
行列の各要素を引数としてブロックを呼び出します。
0行目、1行目、…という順番で処理します。
which に以下の Symbol を指定することで
引数として使われる要素を限定することができます。
* :all - すべての要素(デフォルト)
* :diagonal - 対角要素
* :off_diagonal 対角要素以外
* :lower 対角成分とそれより下側の部分
* :upper対角成分とそれより上側の部分
* :strict_lower 対角成分の下側
* :strict_upper 対角成分の上側
ブロックを省略した場合、 Enumerator ... -
Matrix
# each(which = :all) {|e| . . . } -> self (27637.0) -
行列の各要素を引数としてブロックを呼び出します。
行列の各要素を引数としてブロックを呼び出します。
0行目、1行目、…という順番で処理します。
which に以下の Symbol を指定することで
引数として使われる要素を限定することができます。
* :all - すべての要素(デフォルト)
* :diagonal - 対角要素
* :off_diagonal 対角要素以外
* :lower 対角成分とそれより下側の部分
* :upper対角成分とそれより上側の部分
* :strict_lower 対角成分の下側
* :strict_upper 対角成分の上側
ブロックを省略した場合、 Enumerator ... -
Matrix
. build(row _ size , column _ size = row _ size) -> Enumerable (27637.0) -
row_size×column_sizeの行列をブロックの返り値から生成します。
row_size×column_sizeの行列をブロックの返り値から生成します。
行列の各要素の位置がブロックに渡され、それの返り値が行列の要素となります。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
m = Matrix.build(2, 4) {|row, col| col - row }
# => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
m = Matrix.build(3) { rand }
# => a 3x3 matrix with random... -
Matrix
. build(row _ size , column _ size = row _ size) {|row , col| . . . } -> Matrix (27637.0) -
row_size×column_sizeの行列をブロックの返り値から生成します。
row_size×column_sizeの行列をブロックの返り値から生成します。
行列の各要素の位置がブロックに渡され、それの返り値が行列の要素となります。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
m = Matrix.build(2, 4) {|row, col| col - row }
# => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
m = Matrix.build(3) { rand }
# => a 3x3 matrix with random... -
Thread
. report _ on _ exception=(newstate) (27619.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
デフォルトは false です。
Thread.new { 1.times { raise } }
は $stderr に以下のように出力します:
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in <main>'
1: fr... -
Socket
:: Constants :: IP _ BLOCK _ SOURCE -> Integer (27397.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 _ UNBLOCK _ SOURCE -> Integer (27397.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) -
Thread
# report _ on _ exception -> bool (27391.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
デフォルトはスレッド作成時の Thread.report_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => true
a.run
# => #<Th... -
Socket
:: Constants :: IPV6 _ PKTINFO -> Integer (27349.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 (27349.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 :: IP _ HDRINCL -> Integer (27349.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 _ PKTINFO -> Integer (27349.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 (27349.0) -
@todo Receive packet options with datagrams
@todo
Receive packet options with datagrams -
Socket
:: Constants :: IP _ RECVIF -> Integer (27349.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 (27349.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 _ RECVTOS -> Integer (27349.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 (27349.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) -
Thread
. report _ on _ exception -> bool (27319.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
デフォルトは false です。
Thread.new { 1.times { raise } }
は $stderr に以下のように出力します:
#<Thread:...> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
2: from -e:1:in `block in <main>'
1: fr... -
Rinda
:: TupleSpace (27037.0) -
Tuple Space を表すクラスです。
Tuple Space を表すクラスです。
このクラスのインスタンスを
drb を経由して公開することで
タプルスペースを他のプロセスからアクセスさせることができるようになります。
タプルスペースを drb 経由で利用する側は
DRb::DRbObject.new_with_uri などでこのオブジェクトのリモートオブジェクトを
取得し、Rinda::TupleSpaceProxy をかぶせることで利用します。
===[a:renewer] タプルの寿命と renewer
タプルを Rinda::TupleSpace#write などで追加するときにその寿命を
秒数で指定することができ... -
Marshal フォーマット (20053.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 されません... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (19393.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 (19393.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... -
Base64
. # urlsafe _ encode64(bin , padding: true) -> String (19219.0) -
与えられたデータを Base64 エンコードした文字列を返します。
与えられたデータを Base64 エンコードした文字列を返します。
このメソッドは 4648 の "Base 64 Encoding with URL and Filename Safe Alphabet" に対応しています。
"+" を "-" に "/" を "_" に置き換えます。
デフォルトでは戻り値は = によるパディングを含むことがあります。
パディングを含めたくない場合は、padding オプションに false を指定してください。
@param bin Base64 エンコードするデータを指定します。
@param padding false を指定した場合、 = によ... -
Shellwords
. # shelljoin(array) -> String (18937.0) -
配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。
配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に
使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド
ライン文字列を生成します。
個々の配列要素に対するエスケープには、Shellwords.#shellescape と
同じ規則が適用されます。
@param array エスケープ対象の文字列を要素とする配列を指定します。
@return エスケープ結果を連結した文字列を返します。
例:
require 'shellwords'
pattern = 'Jan 15'
file = 'file nam... -
Enumerable
# max _ by {|item| . . . } -> object | nil (18853.0) -
各要素を順番にブロックに渡して実行し、 その評価結果を <=> で比較して、 最大であった値に対応する元の要素、もしくは最大の n 要素が降順で入った配列を返します。
各要素を順番にブロックに渡して実行し、
その評価結果を <=> で比較して、
最大であった値に対応する元の要素、もしくは最大の n 要素が降順で入った配列を返します。
引数を指定しない形式では要素が存在しなければ nil を返します。
引数を指定する形式では、空の配列を返します。
該当する要素が複数存在する場合、どの要素を返すかは不定です。
Enumerable#max と Enumerable#max_by の
違いは Enumerable#sort と Enumerable#sort_by の違いと同じです。
ブロックを省略した場合は Enumerator を返します。
@par... -
Enumerable
# max _ by(n) {|item| . . . } -> Array (18853.0) -
各要素を順番にブロックに渡して実行し、 その評価結果を <=> で比較して、 最大であった値に対応する元の要素、もしくは最大の n 要素が降順で入った配列を返します。
各要素を順番にブロックに渡して実行し、
その評価結果を <=> で比較して、
最大であった値に対応する元の要素、もしくは最大の n 要素が降順で入った配列を返します。
引数を指定しない形式では要素が存在しなければ nil を返します。
引数を指定する形式では、空の配列を返します。
該当する要素が複数存在する場合、どの要素を返すかは不定です。
Enumerable#max と Enumerable#max_by の
違いは Enumerable#sort と Enumerable#sort_by の違いと同じです。
ブロックを省略した場合は Enumerator を返します。
@par... -
Kernel
# dir _ config(target , idefault = nil , ldefault = nil) -> [String , String] (18853.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" を、
それぞれ追加し... -
Hash
# select! {|key , value| . . . } -> self | nil (18745.0) -
キーと値を引数としてブロックを評価した結果が真であるような要素を self に残します。
キーと値を引数としてブロックを評価した結果が真であるような要素を self
に残します。
keep_if は常に self を返します。
select! はオブジェクトが変更された場合に self を、
されていない場合に nil を返します。
ブロックが与えられなかった場合は、自身と keep_if から生成した
Enumerator オブジェクトを返します。
//emlist[例][ruby]{
h1 = {}
c = ("a".."g")
c.each_with_index {|e, i| h1[i] = e }
h2 = h1.dup
h1.select! # => #<E... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (18745.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) { . . . } (18745.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... -
Syslog
. # mask -> Integer | nil (18655.0) -
ログの優先度のマスクを取得または設定します。 マスクは永続的であり、 Syslog.openやSyslog.close ではリセットされません。
ログの優先度のマスクを取得または設定します。
マスクは永続的であり、
Syslog.openやSyslog.close
ではリセットされません。
@param mask ログの優先度のマスクを設定します。
@raise RuntimeError syslog がオープンされていない場合、発生します。
使用例
require 'syslog'
include Syslog::Constants
# ログの場所は実行環境によって異なる。詳しくはsyslog.conf を参照
log = '/var/log/ftp.log'
Syslog.open('ftpd', L... -
Syslog
. # mask=(mask) (18655.0) -
ログの優先度のマスクを取得または設定します。 マスクは永続的であり、 Syslog.openやSyslog.close ではリセットされません。
ログの優先度のマスクを取得または設定します。
マスクは永続的であり、
Syslog.openやSyslog.close
ではリセットされません。
@param mask ログの優先度のマスクを設定します。
@raise RuntimeError syslog がオープンされていない場合、発生します。
使用例
require 'syslog'
include Syslog::Constants
# ログの場所は実行環境によって異なる。詳しくはsyslog.conf を参照
log = '/var/log/ftp.log'
Syslog.open('ftpd', L...