ライブラリ
- ビルトイン (54)
-
cgi
/ html (24) - mkmf (48)
-
net
/ imap (12) - openssl (12)
- rake (12)
-
rubygems
/ package / tar _ header (24) -
rubygems
/ package / tar _ writer (12) -
shell
/ command-processor (12) - socket (24)
- win32ole (12)
クラス
- BasicSocket (12)
- Exception (12)
-
Gem
:: Package :: TarHeader (24) -
Gem
:: Package :: TarWriter (12) - Module (12)
-
Net
:: IMAP (12) - Object (24)
-
OpenSSL
:: BN (12) - Proc (6)
-
Shell
:: CommandProcessor (12) - Socket (12)
- WIN32OLE (12)
モジュール
-
CGI
:: HtmlExtension (24) - FileUtils (12)
- Kernel (48)
キーワード
- === (12)
-
backtrace
_ locations (12) -
check
_ closed (12) -
check
_ point (6) -
check
_ signedness (24) -
check
_ sizeof (24) - checkbox (12)
- checksum (12)
-
connect
_ nonblock (12) -
finish
_ all _ jobs (6) - getpeereid (12)
-
initialize
_ copy (12) -
ole
_ query _ interface (12) -
prime
_ fasttest? (12) -
ruby2
_ keywords (18) - sh (12)
-
update
_ checksum (12)
検索結果
先頭5件
-
Kernel
# check _ sizeof(type , headers = nil) -> Integer | nil (6209.0) -
与えられた型のサイズを返します。
...ムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
require 'mkmf'
check_sizeof('mystruct') # => 12
である場合、SIZEOF_M......YSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。
@param type 検査したい型を指定します。
@param headers 追加のヘッダファイルを指定します。... -
Kernel
# check _ sizeof(type , headers = nil) { . . . } -> Integer | nil (6209.0) -
与えられた型のサイズを返します。
...ムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
require 'mkmf'
check_sizeof('mystruct') # => 12
である場合、SIZEOF_M......YSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。
@param type 検査したい型を指定します。
@param headers 追加のヘッダファイルを指定します。... -
CGI
:: HtmlExtension # radio _ button(name = "" , value = nil , checked = nil) -> String (6201.0) -
タイプが radio である input 要素を生成します。
...プが radio である input 要素を生成します。
@param name name 属性の値を指定します。
@param value value 属性の値を指定します。
@param checked 真ならば checked 属性を設定します。
例:
radio_button("name", "value")
# <INPUT TYPE="radio" NAME="na......me" VALUE="value">
radio_button("name", "value", true)
# <INPUT TYPE="radio" NAME="name" VALUE="value" CHECKED>... -
BasicSocket
# getpeereid -> [Integer , Integer] (6107.0) -
Unix ドメインソケットにおいて接続相手の euid と egid を 返します。
...d と egid を
返します。
配列の最初の要素が euid, 2番目の要素が egid です。
ソケットが Unix ドメインソケットでない場合の返り値は
不定です。
require 'socket'
Socket.unix_server_loop("/tmp/sock") {|s|
begin
euid, egid = s.getpeereid......# Check the connected client is myself or not.
next if euid != Process.uid
# do something about my resource.
ensure
s.close
end
}... -
Module
# ruby2 _ keywords(method _ name , . . . ) -> nil (6107.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.
...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, th......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
o......ther methods.
This should only be used for methods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions... -
Proc
# ruby2 _ keywords -> proc (6107.0) -
Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc 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 proc to other methods.
...as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked with a special f......r 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 proc to other methods.
This should only be used for procs that delegate keywords to another
method, and only......wards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the proc responds to this method before calling
it. Also, be aware that if this method i... -
Shell
:: CommandProcessor # finish _ all _ jobs (6002.0) -
@todo
...@todo... -
OpenSSL
:: BN # prime _ fasttest?(checks=nil , vtrivdiv=true) -> bool (201.0) -
自身が素数であるなら true を返します。
...自身が素数であるなら true を返します。
vtrivdiv が真である場合には、 Miller-Rabin 法での
判定の前に小さな素数で割ることで素数か否かを
調べます。自身が小さな素数である場合にはこの手順
により素数ではないと誤った......返り値を返します。
Miller-Rabin 法により確率的に判定します。
checksで指定した回数だけ繰り返します。
checksがnilである場合は OpenSSL が適切な
回数を判断します。
//emlist[][ruby]{
require 'openssl'
# 181 は 「小さな素数」である
O......ew("181").prime_fasttest?(nil, true) # => false
OpenSSL::BN.new("181").prime_fasttest?(nil, false) # => true
//}
@param checks Miller-Robin法の繰り返しの回数
@param vtrivdiv 真なら小さな素数で割ることでの素数判定を試みます
@raise OpenSSL::BNError 判定時にエラ... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (119.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
r......aise "#{month} is not long month"
end
def get_exception
return begin
yield
rescue => e
e
end
end
e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:in `get_exception'", "test.rb:15:i... -
WIN32OLE
# ole _ query _ interface(iid) -> WIN32OLE (119.0) -
IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを 持つオブジェクトを取得します。
...IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを
持つオブジェクトを取得します。
オブジェクトが複数のオートメーション用インターフェイスを持つ場合に、当
メソッドを利用して既定のイ......イスを取
得します。
@param iid 取得するインターフェイスのIIDを文字列で指定します。
@return iidパラメータで指定したインターフェイスを持つWIN32OLEオブジェクト
@raise WIN32OLERuntimeError 指定したIIDをオブジェクトが持たない場......Application')
ie_web_app = ie.ole_query_interface('{0002DF05-0000-0000-C000-000000000046}')
上例のie_web_appは、ieと同じインスタンスとなります。
COMの仕様では1つのインターフェイスについて同じIID問い合わせに対しては常
に同一のインター... -
FileUtils
# sh(*cmd) {|result , status| . . . } (107.0) -
与えられたコマンドを実行します。
...す。
@param cmd 引数の解釈に関しては Kernel.#exec を参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #{res.e......xitstatus})"
end
end
@see Kernel.#exec, Kernel.#system...