ライブラリ
- ビルトイン (268)
- base64 (12)
- benchmark (12)
- bigdecimal (14)
-
bigdecimal
/ ludcmp (12) -
bigdecimal
/ newton (24) - continuation (12)
- drb (48)
- etc (36)
- fileutils (403)
- json (156)
- kconv (156)
- objspace (60)
- open-uri (16)
- openssl (48)
- rubygems (12)
- syslog (60)
- timeout (21)
-
webrick
/ accesslog (12) -
webrick
/ httpstatus (12) -
webrick
/ utils (24) - zlib (24)
モジュール
- Base64 (12)
- Benchmark (12)
- DRb (48)
- Etc (36)
- FileUtils (403)
- Gem (12)
- JSON (156)
- Kconv (156)
- Kernel (286)
- LUSolve (12)
- Newton (24)
- ObjectSpace (60)
- OpenSSL (36)
-
OpenSSL
:: ASN1 (12) - Process (24)
- Syslog (60)
- Timeout (21)
-
WEBrick
:: AccessLog (12) -
WEBrick
:: HTTPStatus (12) -
WEBrick
:: Utils (24) - Zlib (24)
キーワード
- BigDecimal (14)
- Complex (14)
- Float (7)
- Integer (7)
- Rational (12)
-
allocation
_ sourcefile (12) -
allocation
_ sourceline (12) - autoload (12)
- autoload? (12)
- benchmark (12)
- callcc (12)
-
caller
_ locations (24) - cd (24)
- chdir (24)
- chmod (12)
-
chmod
_ R (12) - chown (12)
-
chown
_ R (12) -
clock
_ gettime (12) - config (12)
- confstr (12)
- copy (12)
- cp (12)
-
cp
_ lr (7) -
cp
_ r (12) - daemon (12)
- debug (12)
- debug= (12)
- decode64 (12)
- deflate (12)
- dump (12)
- exec (48)
-
fast
_ generate (12) -
fast
_ unparse (12) -
fips
_ mode= (12) - front (12)
- generate (12)
- guess (12)
- install (12)
-
install
_ id _ conv (12) - iseuc (12)
- isjis (12)
- issjis (12)
- isutf8 (12)
- kconv (12)
- link (12)
- ln (12)
-
ln
_ s (12) -
ln
_ sf (12) - load (12)
-
load
_ file (12) -
load
_ file! (12) - ludecomp (12)
- makedirs (12)
-
marshal
_ version (12) - mkdir (12)
-
mkdir
_ p (12) - mkpath (12)
- move (12)
- mv (12)
- nlsolve (12)
- norm (12)
- open (40)
- open! (12)
- parse (12)
- parse! (12)
-
pretty
_ generate (12) -
pretty
_ unparse (12) -
reason
_ phrase (12) - remove (12)
- reopen (12)
- restore (12)
- rm (12)
-
rm
_ f (12) -
rm
_ r (12) -
rm
_ rf (12) - rmdir (12)
- rmtree (12)
-
safe
_ unlink (12) -
set
_ close _ on _ exec (12) -
set
_ non _ blocking (12) -
setup
_ params (12) - spawn (48)
-
start
_ service (12) - symlink (12)
- syscall (12)
- sysconf (12)
- sysconfdir (12)
- system (48)
- timeout (21)
- toeuc (12)
- tojis (12)
- tolocale (12)
- tosjis (12)
- touch (12)
- toutf16 (12)
- toutf32 (12)
- toutf8 (12)
-
trace
_ object _ allocations (12) -
trace
_ object _ allocations _ start (12) -
trace
_ object _ allocations _ stop (12) - traverse (12)
- unparse (12)
- uptodate? (12)
-
zlib
_ version (12)
検索結果
先頭5件
-
Kconv
. # kconv(str , out _ code , in _ code = Kconv :: AUTO) -> String (9201.0) -
文字列 str のエンコーディングを out_code に変換したものを 返します。in_code も指定されていたら str のエンコーディングが in_code だとして動作します。
...し、
いわゆる半角カナを全角に変換します。
これらを変換したくない場合は、 NKF.#nkf を使ってください。
@param str 変換元の文字列
@param out_code 変換後のエンコーディング
@param in_code strのエンコーディング
@see String#kconv... -
Kernel
. # Rational(x , y = 1 , exception: true) -> Rational | nil (6301.0) -
引数を有理数(Rational)に変換した結果を返します。
...有理数(Rational)に変換した結果を返します。
@param x 変換対象のオブジェクトです。
@param y 変換対象のオブジェクトです。省略した場合は x だけを用いて
Rational オブジェクトを作成します。
@param exception false を指定......x/y した Rational オブジェクトを
返します。
//emlist[例][ruby]{
Rational("1/3") # => (1/3)
Rational(1, 3) # => (1/3)
Rational("0.1", "0.3") # => (1/3)
Rational(Complex(1,2), 2) # => ((1/2)+(1/1)*i)
//}
ただし、1.8系とは異なり、Rational オブジェ......クトは常に既約(それ以上
約分できない状態)である事に注意してください。
//emlist[例][ruby]{
Rational(2, 6) # => (1/3)
Rational(1, 3) * 3 # => (1/1)
//}
引数に文字列を指定する場合、以下のいずれかの形式で指定します。
* "1/3... -
DRb
. # install _ id _ conv(idconv) -> () (6201.0) -
サーバ起動時の :id_conv オプションのデフォルト値を指定します。
...サーバ起動時の :id_conv オプションのデフォルト値を指定します。
内部的には DRb::DRbServer.default_id_conv を呼び出すだけです。... -
Kernel
. # Rational(x , y = 1) -> Rational (6201.0) -
引数を有理数(Rational)に変換した結果を返します。
...引数を有理数(Rational)に変換した結果を返します。
@param x 変換対象のオブジェクトです。
@param y 変換対象のオブジェクトです。省略した場合は x だけを用いて
Rational オブジェクトを作成します。
@raise ArgumentError......x/y した Rational オブジェクトを
返します。
//emlist[例][ruby]{
Rational("1/3") # => (1/3)
Rational(1, 3) # => (1/3)
Rational("0.1", "0.3") # => (1/3)
Rational(Complex(1,2), 2) # => ((1/2)+(1/1)*i)
//}
ただし、1.8系とは異なり、Rational オブジェ......クトは常に既約(それ以上
約分できない状態)である事に注意してください。
//emlist[例][ruby]{
Rational(2, 6) # => (1/3)
Rational(1, 3) * 3 # => (1/1)
//}
引数に文字列を指定する場合、以下のいずれかの形式で指定します。
* "1/3... -
Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil (6201.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@pa......def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_locations # => []
test3(1, nil)
# => ["/Us......(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}
@see Thread::Backtrace::Location, Kernel.#caller... -
Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil (6201.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@pa......def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_locations # => []
test3(1, nil)
# => ["/Us......(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}
@see Thread::Backtrace::Location, Kernel.#caller... -
WEBrick
:: Utils . # set _ close _ on _ exec(io) -> () (6102.0) -
指定された io の Fcntl::FD_CLOEXEC を 1 に設定します。 この io は Kernel.#exec などが実行される時に close されるようになります。
指定された io の Fcntl::FD_CLOEXEC を 1 に設定します。
この io は Kernel.#exec などが実行される時に close されるようになります。
@param io IO オブジェクトを指定します。
@see fcntl(2) -
DRb
. # config -> { Symbol => Object } (6101.0) -
カレントサーバの設定を返します。
カレントサーバの設定を返します。
カレントサーバが存在しない場合は、デフォルトの設定を返します。
@see DRb.#current_server -
DRb
. # front -> object (6101.0) -
カレントサーバのフロントオブジェクトを返します。
カレントサーバのフロントオブジェクトを返します。
@raise DRbServerNotFound カレントサーバが存在しない場合に発生します
@see DRb.#current_server -
Etc
. # confstr(name) -> String | nil (6101.0) -
confstr(3) で取得したシステム設定変数の値を返します。
...confstr(3) で取得したシステム設定変数の値を返します。
@param name Etc モジュールの CS_ で始まる定数のいずれかを指定します。
引数 name に対応する設定が行われていない状態の場合は nil を返します。
(confstr(3) が -1 を返し......、errno が設定されていない場合)
//emlist[][ruby]{
require "etc"
Etc.confstr(Etc::CS_PATH) # => "/bin:/usr/bin"
# GNU/Linux
Etc.confstr(Etc::CS_GNU_LIBC_VERSION) # => "glibc 2.18"
Etc.confstr(Etc::CS_GNU_LIBPTHREAD_VERSION) # => "NPTL 2.18"
//}...