8303件ヒット
[1-100件を表示]
(0.253秒)
ライブラリ
- ビルトイン (3246)
- bigdecimal (77)
-
bigdecimal
/ util (11) - date (22)
- dbm (11)
- e2mmap (24)
- fiber (8)
- fiddle (44)
- gdbm (11)
- getoptlong (22)
-
io
/ console (11) - ipaddr (7)
-
irb
/ cmd / load (11) -
irb
/ ext / math-mode (4) - logger (1)
- matrix (291)
-
minitest
/ spec (5) -
minitest
/ unit (19) - mkmf (22)
- monitor (22)
-
net
/ ftp (396) -
net
/ http (121) -
net
/ imap (154) -
net
/ pop (220) -
net
/ smtp (83) -
net
/ telnet (4) - observer (22)
- open-uri (22)
- openssl (968)
- optparse (374)
- ostruct (11)
- pathname (43)
- prime (55)
- pstore (66)
- rake (33)
-
rake
/ packagetask (11) -
rdoc
/ markup (11) -
rdoc
/ rdoc (11) - resolv (77)
- resolv-replace (11)
-
rexml
/ parsers / pullparser (33) -
rinda
/ rinda (22) -
rinda
/ tuplespace (33) - rubygems (11)
-
rubygems
/ command (33) -
rubygems
/ command _ manager (11) -
rubygems
/ commands / lock _ command (11) -
rubygems
/ doc _ manager (22) -
rubygems
/ indexer (11) -
rubygems
/ installer (44) -
rubygems
/ package / tar _ input (11) -
rubygems
/ package / tar _ reader (11) -
rubygems
/ package / tar _ reader / entry (11) -
rubygems
/ package / tar _ writer (11) -
rubygems
/ remote _ fetcher (22) -
rubygems
/ security (11) -
rubygems
/ specification (11) -
rubygems
/ uninstaller (11) -
rubygems
/ user _ interaction (11) - sdbm (11)
- set (44)
- socket (209)
- stringio (416)
- strscan (55)
- thwait (6)
- tsort (43)
- uri (55)
-
webrick
/ httpauth / basicauth (22) -
webrick
/ httpauth / digestauth (22) -
webrick
/ httpservlet / abstract (11) -
webrick
/ httpservlet / filehandler (66) - win32ole (242)
-
yaml
/ dbm (11) - zlib (187)
クラス
-
ARGF
. class (99) - Addrinfo (22)
- Array (489)
- BasicObject (33)
- BasicSocket (77)
- BigDecimal (77)
- Binding (11)
- Complex (33)
- DBM (11)
- Date (22)
- Dir (28)
- Enumerator (55)
-
Enumerator
:: Lazy (162) - Exception (62)
- Fiber (27)
-
Fiddle
:: Handle (22) -
Fiddle
:: Pointer (22) - File (36)
- Float (19)
- GDBM (11)
-
Gem
:: Command (33) -
Gem
:: CommandManager (11) -
Gem
:: Commands :: LockCommand (11) -
Gem
:: DocManager (22) -
Gem
:: Indexer (11) -
Gem
:: Installer (44) -
Gem
:: Package :: TarInput (11) -
Gem
:: Package :: TarReader (11) -
Gem
:: Package :: TarReader :: Entry (11) -
Gem
:: Package :: TarWriter :: BoundedStream (11) -
Gem
:: RemoteFetcher (22) -
Gem
:: Security :: Policy (11) -
Gem
:: Specification (11) -
Gem
:: StreamUI (11) -
Gem
:: Uninstaller (11) - GetoptLong (22)
- IO (546)
- IPAddr (7)
- IPSocket (11)
-
IRB
:: Context (4) -
IRB
:: ExtendCommand :: Load (11) - Integer (114)
-
Logger
:: Application (1) - MatchData (92)
- Matrix (224)
- Module (213)
-
MonitorMixin
:: ConditionVariable (22) -
Net
:: FTP (396) -
Net
:: HTTP (44) -
Net
:: HTTPResponse (11) -
Net
:: IMAP (154) -
Net
:: POP3 (77) -
Net
:: POPMail (143) -
Net
:: SMTP (83) -
Net
:: Telnet (4) - Numeric (73)
- Object (170)
-
OpenSSL
:: ASN1 :: ObjectId (11) -
OpenSSL
:: BN (77) -
OpenSSL
:: Cipher (44) -
OpenSSL
:: Config (11) -
OpenSSL
:: Engine (22) -
OpenSSL
:: Netscape :: SPKI (88) -
OpenSSL
:: OCSP :: BasicResponse (11) -
OpenSSL
:: OCSP :: Request (22) -
OpenSSL
:: PKCS7 (55) -
OpenSSL
:: PKey :: DH (11) -
OpenSSL
:: PKey :: DSA (11) -
OpenSSL
:: PKey :: EC (44) -
OpenSSL
:: PKey :: EC :: Group (22) -
OpenSSL
:: PKey :: EC :: Point (11) -
OpenSSL
:: PKey :: PKey (22) -
OpenSSL
:: PKey :: RSA (44) -
OpenSSL
:: SSL :: SSLContext (11) -
OpenSSL
:: SSL :: SSLServer (11) -
OpenSSL
:: SSL :: SSLSocket (44) -
OpenSSL
:: X509 :: Attribute (55) -
OpenSSL
:: X509 :: CRL (55) -
OpenSSL
:: X509 :: Certificate (99) -
OpenSSL
:: X509 :: Extension (11) -
OpenSSL
:: X509 :: Name (11) -
OpenSSL
:: X509 :: Request (11) -
OpenSSL
:: X509 :: Revoked (11) -
OpenSSL
:: X509 :: Store (77) - OpenStruct (11)
- OptionParser (319)
- PStore (66)
- Pathname (43)
- Prime (11)
-
Prime
:: PseudoPrimeGenerator (33) - Proc (44)
-
RDoc
:: Markup (11) -
RDoc
:: RDoc (11) -
REXML
:: Parsers :: PullParser (33) -
Rake
:: InvocationChain (11) -
Rake
:: PackageTask (11) - Random (44)
- Range (216)
- Rational (88)
- Resolv (22)
-
Resolv
:: DNS (33) -
Resolv
:: Hosts (22) -
Rinda
:: TupleSpace (33) -
Rinda
:: TupleSpaceProxy (22) - SDBM (11)
- Set (44)
- Socket (44)
-
Socket
:: AncillaryData (33) - String (254)
- StringIO (416)
- StringScanner (55)
- SystemCallError (11)
- SystemExit (11)
- TCPServer (22)
- Thread (76)
-
Thread
:: Mutex (27) - ThreadsWait (6)
- TracePoint (95)
- UDPSocket (11)
-
URI
:: Generic (55) - Vector (67)
-
WEBrick
:: HTTPAuth :: BasicAuth (22) -
WEBrick
:: HTTPAuth :: DigestAuth (22) -
WEBrick
:: HTTPServlet :: AbstractServlet (11) -
WEBrick
:: HTTPServlet :: DefaultFileHandler (22) -
WEBrick
:: HTTPServlet :: FileHandler (44) - WIN32OLE (121)
-
WIN32OLE
_ EVENT (22) -
WIN32OLE
_ TYPE (22) -
WIN32OLE
_ TYPELIB (44) -
WIN32OLE
_ VARIANT (33) -
YAML
:: DBM (11) -
Zlib
:: GzipReader (176) -
Zlib
:: Inflate (11)
モジュール
- Comparable (21)
- Enumerable (143)
- Exception2MessageMapper (24)
- Kernel (33)
-
MiniTest
:: Assertions (19) -
Net
:: HTTPHeader (66) - Observable (22)
-
OpenSSL
:: Buffering (44) -
OpenSSL
:: SSL :: SocketForwarder (22) -
OpenURI
:: OpenRead (22) -
OptionParser
:: Arguable (55) -
Rake
:: TaskManager (22) - TSort (43)
キーワード
- * (11)
- ** (22)
- + (11)
- - (11)
-
/ (11) - << (11)
- === (11)
- Fail (6)
- [] (224)
- []= (155)
-
_ getproperty (11) -
_ invoke (11) -
_ setproperty (11) - abort (11)
- accept (22)
-
accept
_ nonblock (22) - acct (11)
- add (11)
-
add
_ cert (11) -
add
_ certid (11) -
add
_ certificate (11) -
add
_ crl (22) -
add
_ entry (11) -
add
_ extension (33) -
add
_ file (11) -
add
_ observer (11) -
add
_ path (11) -
add
_ revoked (11) -
add
_ value (11) -
add
_ word _ pair (11) - advise (11)
- all (33)
-
angle
_ with (11) - antisymmetric? (6)
- append (22)
- assert (1)
-
assert
_ block (1) -
assert
_ empty (1) -
assert
_ equal (1) -
assert
_ in _ delta (1) -
assert
_ in _ epsilon (1) -
assert
_ includes (1) -
assert
_ instance _ of (1) -
assert
_ kind _ of (1) -
assert
_ match (1) -
assert
_ nil (1) -
assert
_ operator (1) -
assert
_ raises (1) -
assert
_ respond _ to (1) -
assert
_ same (1) -
assert
_ send (1) -
assert
_ throws (1) - at (11)
-
auth
_ only (11) - authenticate (22)
- backtrace (11)
-
backtrace
_ locations (11) - begin (22)
- between? (11)
- birthtime (10)
- bsearch (44)
- byteindex (2)
- byteoffset (4)
- bytes (21)
- bytesplice (2)
- call (11)
-
callee
_ id (11) - cause (11)
- ceil (11)
- certificates= (11)
- challenge (33)
- challenge= (11)
- chars (21)
- chdir (11)
- children (11)
- chr (22)
- chunk (11)
-
chunk
_ while (8) - cipher (11)
- clamp (10)
-
class
_ variable _ get (11) -
clear
_ bit! (11) - clone (11)
-
close
_ read (22) - coerce (11)
- cofactor (22)
-
cofactor
_ expansion (11) - collect (11)
- collect2 (11)
-
collect
_ concat (11) - combination (22)
- complain (11)
- connect (11)
-
connect
_ address (11) -
connect
_ nonblock (11) -
const
_ get (11) -
const
_ missing (11) -
content
_ length (11) - create (11)
- cycle (22)
- decrypt (22)
- define (11)
-
define
_ method (22) - delete (55)
- delete! (11)
-
delete
_ at (11) -
deprecate
_ constant (9) - det (11)
- detect (22)
- determinant (11)
- diagonal? (11)
- digest (11)
- digits (11)
- dir (22)
- div (11)
-
do
_ GET (22) -
do
_ OPTIONS (11) -
do
_ POST (11) - document (11)
- download (11)
- drop (11)
-
dsa
_ sign _ asn1 (11) -
dsa
_ verify _ asn1 (11) - dup (11)
- each (176)
- each2 (11)
-
each
_ byte (55) -
each
_ char (33) -
each
_ child (6) -
each
_ line (110) -
each
_ mail (11) - eigen (11)
- eigensystem (11)
- encrypt (11)
- end (22)
-
enhance
_ with _ matching _ rule (11) -
ensure
_ dependency (11) - entries (17)
-
entrywise
_ product (7) -
enum
_ for (44) - environment (11)
- eof (11)
- eof? (11)
- errno (11)
-
eval
_ script (6) - event (11)
- examine (11)
- exception (11)
- execute (22)
- expunge (11)
- extensions= (11)
-
extract
_ entry (11) -
extract
_ files (11) - fail (6)
- fcntl (22)
- fdatasync (11)
- feed (11)
- fetch (117)
- fileno (11)
- filter (6)
-
filter
_ map (5) - find (22)
-
find
_ all (11) -
find
_ command (11) - first (44)
-
first
_ minor (11) -
flat
_ map (11) - flatten (22)
- flatten! (22)
- flock (11)
- floor (11)
- flunk (1)
- fragment= (11)
- gem (11)
-
generate
_ bin (11) -
generate
_ key (11) -
generate
_ key! (11) - get (22)
-
get
_ all _ gem _ names (11) -
get
_ one _ gem _ name (11) - getaddress (33)
- getbinaryfile (22)
- getbyte (11)
- getc (22)
- getname (33)
- getnameinfo (11)
- getopts (33)
- getquota (11)
- getquotaroot (11)
- getresource (11)
- gets (46)
- gettextfile (22)
-
hadamard
_ product (7) - header (11)
- help (11)
- hermitian? (11)
- hostname= (11)
- inflate (11)
-
initialize
_ copy (11) -
inner
_ product (11) - insert (11)
- inspect (11)
- install (11)
-
instance
_ eval (22) -
instance
_ method (11) -
instruction
_ sequence (6) - int (11)
- intersection (5)
- invoke (11)
- ioctl (11)
-
ip
_ pktinfo (11) - issuer= (11)
- join (33)
-
laplace
_ expansion (11) - last (44)
-
last
_ update= (11) -
library
_ name (11) - lineno (22)
- lineno= (11)
- lines (35)
- list (22)
- listen (22)
-
local
_ variable _ get (11) - login (22)
- ls (22)
- mail (33)
- mails (11)
-
major
_ version (22) -
make
_ affine! (11) -
make
_ partial _ content (11) - map (11)
-
marshal
_ load (11) -
mask
_ bits! (11) -
math
_ mode= (4) - max (86)
- mdtm (11)
- method (11)
-
method
_ id (11) -
method
_ missing (22) - min (86)
- mkdir (11)
-
mod
_ add (11) - modifiable (11)
- mtime (11)
- mult (11)
-
must
_ be _ instance _ of (1) -
must
_ be _ kind _ of (1) -
must
_ be _ within _ delta (1) -
must
_ be _ within _ epsilon (1) -
must
_ respond _ to (1) -
n
_ mails (11) - name= (9)
- next (22)
-
next
_ update= (11) -
next
_ values (11) -
next
_ wait (6) - normal? (11)
- normalize (11)
-
not
_ after= (11) -
not
_ before= (11) -
notify
_ observers (11) - offset (22)
- oid (22)
- oid= (11)
-
ole
_ activex _ initialize (11) -
ole
_ query _ interface (11) - on (132)
-
on
_ event (11) -
on
_ event _ with _ outargs (11) - opaque= (11)
- open (22)
-
open
_ uri _ or _ path (11) - ord (11)
- order (44)
- order! (44)
- orthogonal? (11)
- padding= (11)
- parameters (6)
- paranoid (11)
- parse (22)
- parse! (22)
- password= (11)
- path (29)
- path= (11)
- peek (33)
-
peek
_ values (11) - peep (11)
- permutation (22)
- permutation? (11)
- permute (22)
- permute! (22)
-
pkcs5
_ keyivgen (11) - pointer= (11)
- pop (55)
- pos= (22)
-
post
_ connection _ check (11) - pow (22)
- pread (7)
- prefix= (7)
-
prime
_ division (22) -
prime
_ fasttest? (11) - print (33)
- printf (22)
- private (23)
-
private
_ constant (11) -
private
_ decrypt (11) -
private
_ encrypt (11) -
private
_ key= (11) - protected (19)
- public (19)
-
public
_ constant (11) -
public
_ decrypt (11) -
public
_ encrypt (11) -
public
_ instance _ method (11) -
public
_ key (22) -
public
_ key= (22) -
public
_ method (11) -
public
_ send (22) - pull (11)
- put (22)
- putbinaryfile (22)
- puts (22)
- puttextfile (22)
- quo (11)
- raise (5)
-
raised
_ exception (11) - rand (33)
- range (11)
-
range
_ length (11) - rationalize (22)
- raw (11)
- read (88)
-
read
_ nonblock (33) - readbyte (33)
- readchar (55)
- readline (99)
- readlines (55)
- readpartial (66)
- ready (11)
- recv (11)
-
recv
_ nonblock (11) - recvfrom (22)
-
recvfrom
_ nonblock (11) - reject (22)
-
relative
_ path _ from (11) - remove (11)
-
remove
_ class _ variable (11) -
remove
_ const (11) -
remove
_ instance _ variable (11) -
remove
_ method (11) - rename (22)
-
renegotiation
_ cb= (11) - reopen (33)
-
repeated
_ combination (22) -
repeated
_ permutation (22) - replace (22)
-
report
_ on _ exception (8) -
report
_ on _ exception= (8) - request (22)
-
respond
_ to? (11) - resume (11)
- retrbinary (22)
-
return
_ value (11) - rewind (33)
- rmdir (11)
- root? (11)
- rotate (11)
- rotate! (11)
- round (30)
- run (11)
-
run
_ rdoc (11) - sample (44)
- select (22)
- send (22)
-
send
_ mail (11) - sendmail (11)
- service (22)
-
set
_ backtrace (11) -
set
_ bit! (11) -
set
_ default _ paths (11) -
set
_ generator (11) - setproperty (22)
- setquota (11)
- setsockopt (33)
-
setup
_ rdoc (11) - shift (22)
- shutdown (11)
- sign (33)
-
signature
_ algorithm (11) -
singleton
_ class (11) -
singleton
_ method (11) - singular? (11)
- site (11)
- size (11)
-
skew
_ symmetric? (6) - skip (1)
- sleep (9)
- slice (66)
- sqrt (11)
- start (73)
- stat (11)
- status (55)
- step (83)
- storbinary (22)
- sub (11)
- subject (11)
- subject= (11)
- subscribe (11)
- subtract (11)
- succ (11)
- sym (11)
- sync= (11)
- synchronize (9)
-
synthesize
_ file _ task (11) - sysread (55)
- sysverify (11)
- take (33)
- terminate (11)
-
terminate
_ interaction (11) -
to
_ a (6) -
to
_ d (11) -
to
_ der (11) -
to
_ enum (44) -
to
_ i (33) -
to
_ int (11) -
to
_ path (7) -
to
_ pem (11) -
to
_ r (11) -
to
_ s (33) - top (11)
- tr (11)
- trace (11)
- transaction (11)
- transfer (11)
- truncate (33)
-
try
_ do (22) -
tsort
_ each (21) -
tsort
_ each _ child (11) -
tsort
_ each _ node (11) -
undef
_ method (11) - ungetc (33)
-
unicode
_ normalize (10) -
unicode
_ normalize! (10) -
unicode
_ normalized? (10) - unitary? (11)
-
unix
_ path (11) -
unix
_ rights (11) - unlock (9)
- unscan (11)
- unsubscribe (11)
- validate (11)
- value (22)
- value= (33)
- variables (11)
- verify (55)
-
verify
_ gem (11) - version (11)
- version= (11)
- wait (11)
-
wait
_ while (11) - waitfor (4)
- write (40)
-
write
_ nonblock (11) - yield (11)
- zip (11)
検索結果
先頭5件
-
Gem
:: CommandManager # find _ command(command _ name) -> Gem :: Command | nil (27707.0) -
登録されているコマンドからマッチしたものを返します。
...ているコマンドからマッチしたものを返します。
@param command_name コマンド名を文字列で指定します。
@return Gem::Command のサブクラスのインスタンスを返します。
@raise RuntimeError マッチする可能性のあるコマンドが複数ある... -
Exception2MessageMapper
# Raise(exception _ class = nil , *rest) -> () (24332.0) -
登録されている情報を使用して、例外を発生させます。
...aram exception_class 例外クラス。
@param rest メッセージに埋め込む値。
@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。
例:
class Foo
extend Exception2Messa......apper
p def_exception :NewExceptionClass, "message...%d, %d and %d" # =>
def foo
Raise NewExceptionClass, 1, 2, 3
end
end
Foo.new().foo() #=> in `Raise': message...1, 2 and 3 (Foo::NewExceptionClass)
# という例外が発生します。
Foo.Ra......ise Foo::NewExceptionClass, 1, 3, 5 #=> in `Raise': message...1, 3 and 5 (Foo::NewExceptionClass)
# という例外が発生します。... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (18507.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...on#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date.n......0, month, -1).day == 31
raise "#{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:in `<main>'"]
//}
@see Exception#backtrace... -
TracePoint
# raised _ exception -> Exception (18419.0) -
発生した例外を返します。
...。
@raise RuntimeError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。
//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
begin
0/......0
rescue
end
//}... -
OpenSSL
:: X509 :: Certificate # extensions=(extensions) (18407.0) -
証明書の拡張領域の内容を設定します。
...証明書の拡張領域の内容を設定します。
@param extensions 設定する拡張(OpenSSL::X509::Extension オブジェクト)の配列
@raise OpenSSL::X509::CertificateError 設定に失敗した場合に発生します... -
Pathname
# relative _ path _ from(base _ directory) -> Pathname (18407.0) -
base_directory から self への相対パスを求め、その内容の新しい Pathname オブジェクトを生成して返します。
...base_directory から self への相対パスを求め、その内容の新しい Pathname
オブジェクトを生成して返します。
パス名の解決は文字列操作によって行われ、ファイルシステムをアクセス
しません。
self が相対パスなら base_directory......、self が絶対パスなら
base_directory も絶対パスでなければなりません。
@param base_directory ベースディレクトリを表す Pathname オブジェクトを指定します。
@raise ArgumentError Windows上でドライブが違うなど、base_directory から self へ......の相対パスが求められないときに例外が発生します。
//emlist[例][ruby]{
require 'pathname'
path = Pathname.new("/tmp/foo")
base = Pathname.new("/tmp")
path.relative_path_from(base) # => #<Pathname:foo>
//}... -
Random
# rand(range) -> Integer | Float (18319.0) -
一様な擬似乱数を発生させます。
...形式では 0 以上 max 未満の数を返します。
max が正の整数なら整数を、正の実数なら実数を返します。
0 や負の数を指定することは出来ません。
三番目の形式では range で指定された範囲の値を返します。
range の始端と終端......場合は実数を返します。
rangeが終端を含まない(つまり ... で生成した場合)には終端の値は乱数の範囲から除かれます。
range.end - range.begin が整数を返す場合は range.begin + self.rand((range.end - range.begin) + e)
の値を返します(e は終......)。
range.end - range.begin が実数を返す場合も同様です。
このため range が Time の場合などにもうまく動作します。
引数が実数でも範囲でもない場合は Object#to_int で変換した値が指定されたものとして扱います。
@param max 乱数... -
MiniTest
:: Assertions # assert _ nil(object , message = nil) -> true (18307.0) -
与えられたオブジェクトが nil である場合、検査にパスしたことになります。
...与えられたオブジェクトが nil である場合、検査にパスしたことになります。
@param object 任意のオブジェクトを指定します。
@param message 検査に失敗した場合に表示するメッセージを指定します。
文字列か Proc......を指定します。Proc である場合は Proc#call した
結果を使用します。
@raise MiniTest::Assertion 与えられたオブジェクトが nil でない場合に発生します。... -
Gem
:: Installer # install -> Gem :: Specification (18219.0) -
Gem をインストールします。
...cache/<gem-version>.gem #=> インストールした Gem のコピー
gems/<gem-version>/... #=> インストール時に展開したファイル
specifications/<gem-version>.gemspec #=> gemspec ファイル
@return ロードされた Gem::Specification の......を返します。
@raise Gem::InstallError 要求された Ruby のバージョンを満たしていない場合に発生します。
@raise Gem::InstallError 要求された RubyGems のバージョンを満たしていない場合に発生します。
@raise Gem::InstallError Zlib::GzipFile::E... -
Random
# rand -> Float (18219.0) -
一様な擬似乱数を発生させます。
...形式では 0 以上 max 未満の数を返します。
max が正の整数なら整数を、正の実数なら実数を返します。
0 や負の数を指定することは出来ません。
三番目の形式では range で指定された範囲の値を返します。
range の始端と終端......場合は実数を返します。
rangeが終端を含まない(つまり ... で生成した場合)には終端の値は乱数の範囲から除かれます。
range.end - range.begin が整数を返す場合は range.begin + self.rand((range.end - range.begin) + e)
の値を返します(e は終......)。
range.end - range.begin が実数を返す場合も同様です。
このため range が Time の場合などにもうまく動作します。
引数が実数でも範囲でもない場合は Object#to_int で変換した値が指定されたものとして扱います。
@param max 乱数... -
Random
# rand(max) -> Integer | Float (18219.0) -
一様な擬似乱数を発生させます。
...形式では 0 以上 max 未満の数を返します。
max が正の整数なら整数を、正の実数なら実数を返します。
0 や負の数を指定することは出来ません。
三番目の形式では range で指定された範囲の値を返します。
range の始端と終端......場合は実数を返します。
rangeが終端を含まない(つまり ... で生成した場合)には終端の値は乱数の範囲から除かれます。
range.end - range.begin が整数を返す場合は range.begin + self.rand((range.end - range.begin) + e)
の値を返します(e は終......)。
range.end - range.begin が実数を返す場合も同様です。
このため range が Time の場合などにもうまく動作します。
引数が実数でも範囲でもない場合は Object#to_int で変換した値が指定されたものとして扱います。
@param max 乱数...