ライブラリ
- ビルトイン (1035)
- bigdecimal (165)
-
cgi
/ core (22) -
cgi
/ util (55) - coverage (7)
- csv (22)
- date (11)
- debug (11)
- drb (55)
- erb (11)
- etc (66)
- fcntl (22)
- fiddle (176)
-
fiddle
/ import (44) - fileutils (11)
- find (11)
- ipaddr (11)
-
irb
/ cmd / subirb (11) -
irb
/ ext / use-loader (22) -
irb
/ extend-command (99) -
irb
/ frame (11) - json (33)
- kconv (11)
- logger (33)
- matrix (77)
-
minitest
/ unit (23) - mkmf (132)
- monitor (11)
-
mutex
_ m (22) -
net
/ ftp (20) -
net
/ http (44) -
net
/ imap (99) -
net
/ pop (99) - nkf (11)
- objspace (33)
- observer (22)
- openssl (209)
- pathname (33)
- prime (88)
-
rdoc
/ context (11) -
rexml
/ document (55) -
rexml
/ parsers / pullparser (11) -
rubygems
/ command _ manager (11) -
rubygems
/ commands / unpack _ command (11) -
rubygems
/ gem _ runner (11) -
rubygems
/ package / tar _ header (22) -
rubygems
/ package / tar _ writer (44) -
rubygems
/ remote _ fetcher (11) -
rubygems
/ server (22) -
rubygems
/ specification (33) -
rubygems
/ uninstaller (66) -
rubygems
/ user _ interaction (33) - set (11)
- shell (33)
-
shell
/ command-processor (30) -
shell
/ filter (12) - socket (693)
- stringio (33)
- strscan (44)
- sync (42)
-
syslog
/ logger (22) - tempfile (11)
-
test
/ unit (1) - tracer (11)
- uri (32)
-
webrick
/ httprequest (22) -
webrick
/ httpresponse (22) -
webrick
/ httpserver (99) -
webrick
/ httpservlet / cgihandler (11) -
webrick
/ httputils (11) -
webrick
/ server (11) - win32ole (55)
- zlib (55)
クラス
- Addrinfo (77)
- Array (94)
- BasicObject (11)
- BigDecimal (165)
- CGI (66)
- CSV (22)
- Coverage (7)
-
DRb
:: DRbUnknown (44) -
DRb
:: DRbUnknownError (11) - Date (11)
- Dir (11)
- ERB (11)
-
Encoding
:: UndefinedConversionError (55) -
Enumerator
:: Lazy (46) -
Fiddle
:: Closure (11) -
Fiddle
:: Closure :: BlockCaller (11) -
Fiddle
:: Function (88) -
Fiddle
:: Handle (44) -
Fiddle
:: Pointer (11) - File (44)
- Float (37)
-
Gem
:: CommandManager (11) -
Gem
:: Commands :: UnpackCommand (11) -
Gem
:: GemRunner (11) -
Gem
:: Package :: TarHeader (22) -
Gem
:: Package :: TarWriter :: BoundedStream (44) -
Gem
:: RemoteFetcher (11) -
Gem
:: Server (22) -
Gem
:: Specification (33) -
Gem
:: StreamUI :: SilentProgressReporter (11) -
Gem
:: StreamUI :: SimpleProgressReporter (11) -
Gem
:: StreamUI :: VerboseProgressReporter (11) -
Gem
:: Uninstaller (66) - IO (22)
- IPAddr (11)
-
IRB
:: ExtendCommand :: Foreground (11) -
IRB
:: Frame (11) - Integer (44)
- Logger (22)
- Matrix (77)
- Method (11)
-
MiniTest
:: Unit (15) -
MiniTest
:: Unit :: TestCase (8) - Module (63)
-
MonitorMixin
:: ConditionVariable (11) - Mutex (2)
-
Net
:: FTP (11) -
Net
:: FTP :: MLSxEntry (9) -
Net
:: HTTP (11) -
Net
:: IMAP (55) -
Net
:: IMAP :: ResponseError (11) -
Net
:: IMAP :: UntaggedResponse (33) -
Net
:: POP3 (88) -
Net
:: POPMail (11) - Numeric (22)
- Object (27)
-
OpenSSL
:: ASN1 :: BitString (11) -
OpenSSL
:: ASN1 :: UniversalString (22) - Pathname (33)
- Prime (44)
-
Prime
:: PseudoPrimeGenerator (22) -
RDoc
:: Context (11) -
RDoc
:: Options (22) -
REXML
:: Element (22) -
REXML
:: Entity (11) -
REXML
:: Parent (11) -
REXML
:: Parsers :: PullParser (11) -
REXML
:: Text (11) - Rational (22)
- Regexp (11)
- Set (11)
- Shell (33)
-
Shell
:: CommandProcessor (30) -
Shell
:: Filter (12) - Socket (231)
-
Socket
:: AncillaryData (22) -
Socket
:: Option (11) - String (67)
- StringIO (33)
- StringScanner (44)
-
Sync
_ m :: UnknownLocker (6) -
Syslog
:: Logger (22) - Tempfile (11)
- Thread (33)
-
Thread
:: Mutex (9) - Time (35)
- Tracer (22)
- UNIXServer (88)
- UNIXSocket (132)
- UnboundMethod (163)
- UncaughtThrowError (30)
-
WEBrick
:: GenericServer (11) -
WEBrick
:: HTTPRequest (22) -
WEBrick
:: HTTPResponse (22) -
WEBrick
:: HTTPServer (55) -
WEBrick
:: HTTPServer :: MountTable (44) -
WEBrick
:: HTTPServlet :: CGIHandler (11) - WIN32OLE (22)
-
WIN32OLE
_ EVENT (11) -
Zlib
:: GzipReader (22)
モジュール
-
CGI
:: QueryExtension (11) - Enumerable (77)
- Etc (66)
- Fcntl (22)
- Fiddle (11)
-
Fiddle
:: Importer (44) -
File
:: Constants (22) - FileUtils (11)
- Find (11)
- GC (11)
-
IRB
:: ExtendCommandBundle (121) - JSON (33)
- Kconv (11)
- Kernel (154)
-
Logger
:: Severity (11) -
Mutex
_ m (22) - NKF (11)
-
Net
:: HTTPHeader (33) - ObjectSpace (55)
- Observable (22)
-
OpenSSL
:: ASN1 (44) -
OpenSSL
:: Buffering (11) -
OpenSSL
:: OCSP (33) -
OpenSSL
:: X509 (88) - Process (22)
-
Socket
:: Constants (132) -
Sync
_ m (36) -
Test
:: Unit (1) - URI (32)
-
WEBrick
:: HTTPUtils (11) -
WIN32OLE
:: VARIANT (11) - Zlib (33)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - == (11)
-
AF
_ UNIX (22) -
AF
_ UNSPEC (22) - CGIRunner (11)
- ConverterNotFoundError (11)
- DEFAULT (11)
-
EXCEPTION
_ UNDERFLOW (11) -
F
_ UNLCK (11) - Fail (6)
-
INADDR
_ UNSPEC _ GROUP (22) -
IPV6
_ UNICAST _ HOPS (22) -
IP
_ UNBLOCK _ SOURCE (22) -
LOCK
_ UN (11) -
MAX
_ MULTIPART _ COUNT (11) -
MCAST
_ UNBLOCK _ SOURCE (22) -
MSG
_ CTRUNC (22) -
MSG
_ TRUNC (22) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) -
NO
_ OVERRIDE (11) -
OS
_ UNIX (11) -
OS
_ UNKNOWN (11) -
OVERRIDE
_ ALL (11) -
OVERRIDE
_ PRIVATE _ ONLY (11) -
O
_ TRUNC (11) -
PASSTHROUGH
_ EXCEPTIONS (1) -
PC
_ NO _ TRUNC (11) -
PF
_ UNIX (22) -
PF
_ UNSPEC (22) -
RESPONSE
_ STATUS _ UNAUTHORIZED (11) -
REVOKED
_ STATUS _ UNSPECIFIED (11) - ROUNDS (7)
-
ROUND
_ CEILING (11) -
ROUND
_ DOWN (11) -
ROUND
_ FLOOR (11) -
ROUND
_ HALF _ DOWN (11) -
ROUND
_ HALF _ EVEN (11) -
ROUND
_ HALF _ UP (11) -
ROUND
_ MODE (11) -
ROUND
_ UP (11) -
SC
_ 2 _ FORT _ RUN (11) -
SC
_ 2 _ PBS _ ACCOUNTING (11) -
SC
_ THREAD _ SAFE _ FUNCTIONS (11) -
SC
_ XOPEN _ UNIX (11) -
SOPRI
_ BACKGROUND (22) -
SO
_ DONTTRUNC (22) - STDCALL (11)
-
SUPPORTS
_ INFO _ SIGNAL (1) - TRUNC (11)
- UNDEFINED (11)
- UNIVERSALSTRING (11)
-
UNIVERSAL
_ TAG _ NAME (11) - UNKNOWN (44)
- UNMARKED (11)
-
UNPACK
_ FORMAT (11) - UNSAFE (11)
- UndefinedConversionError (11)
- UniversalString (22)
- VERSION (1)
-
VT
_ UNKNOWN (11) -
V
_ CERTSTATUS _ UNKNOWN (11) -
V
_ ERR _ CERT _ UNTRUSTED (11) -
V
_ ERR _ UNABLE _ TO _ DECODE _ ISSUER _ PUBLIC _ KEY (11) -
V
_ ERR _ UNABLE _ TO _ DECRYPT _ CERT _ SIGNATURE (11) -
V
_ ERR _ UNABLE _ TO _ DECRYPT _ CRL _ SIGNATURE (11) -
V
_ ERR _ UNABLE _ TO _ GET _ CRL (11) -
V
_ ERR _ UNABLE _ TO _ GET _ ISSUER _ CERT (11) -
V
_ ERR _ UNABLE _ TO _ GET _ ISSUER _ CERT _ LOCALLY (11) -
V
_ ERR _ UNABLE _ TO _ VERIFY _ LEAF _ SIGNATURE (11) - WIN32OLERuntimeError (11)
- WUNTRACED (11)
- [] (44)
-
_ _ name _ _ (1) - abi (11)
- accept (11)
-
accept
_ nonblock (11) - acct (11)
-
add
_ observer (11) -
add
_ runtime _ dependency (11) -
add
_ trace _ func (11) - addr (11)
- arity (11)
-
ask
_ if _ ok (11) -
assertion
_ count (1) - at (13)
-
auth
_ only (11) - autorun (1)
-
basic
_ auth (11) -
bin
_ dir (11) - bind (22)
-
bind
_ call (10) - body (11)
- buf (11)
- call (11)
-
check
_ signedness (22) -
check
_ until (11) - chunk (33)
-
chunk
_ while (19) - chunked= (11)
- chunked? (22)
-
clock
_ gettime (11) - clone (11)
-
column
_ count (11) -
column
_ size (11) - count (121)
-
count
_ nodes (11) -
count
_ objects (11) -
count
_ objects _ size (11) -
count
_ observers (11) -
count
_ tdata _ objects (11) - data (11)
-
debug
_ output _ exclusive _ unlock (3) -
debug
_ output _ unlock (6) -
def
_ extend _ command (11) - delete (11)
-
delete
_ all (22) -
dependencies
_ ok? (11) -
destination
_ encoding (11) -
destination
_ encoding _ name (11) - dlunwrap (11)
-
dry
_ run (11) -
dry
_ run= (11) - each (44)
-
each
_ prime (22) - encode (7)
- eql? (11)
-
error
_ char (11) - errors (1)
- escape (7)
- exception (11)
- execute (11)
- expunge (11)
-
extend
_ object (11) - extern (11)
- failures (1)
-
fast
_ unparse (11) -
find
_ library (22) - flock (11)
- foreach (11)
- free (11)
-
gem
_ home (11) -
get
_ path (11) - greeting (11)
-
has
_ unit _ tests? (11) - hash (11)
-
have
_ func (22) -
have
_ library (22) - inspect (11)
-
install
_ extend _ commands (11) -
instance
_ method (11) -
ip
_ unpack (11) -
ipv6
_ unique _ local? (11) -
ipv6
_ unspecified? (11) -
irb
_ context (11) -
irb
_ exit (11) -
irb
_ load (11) -
irb
_ original _ method _ name (11) -
irb
_ require (11) - limit (11)
- listen (11)
- location (1)
-
max
_ flag _ count (11) -
method
_ undefined (11) -
minitest
/ unit (1) -
module
_ function (19) - mount (11)
-
mount
_ proc (22) - mountpoint? (11)
-
mu
_ unlock (11) - name (44)
- new (165)
-
ole
_ func _ methods (11) -
ole
_ reference _ count (11) - open (44)
-
original
_ name (11) - owner (11)
-
pack
_ sockaddr _ un (11) - pair (11)
- parameters (11)
- passed? (1)
- path (11)
-
path
_ ok? (11) - peeraddr (11)
-
pretty
_ unparse (11) -
process
_ args (1) -
proxy
_ basic _ auth (11) - prune (11)
- ptr (11)
-
public
_ instance _ method (11) - puke (1)
-
raw
_ data (11) -
rb
_ define _ method (11) -
recv
_ io (11) - recvfrom (11)
- reload (11)
- report (1)
- response (11)
- round (107)
-
row
_ count (11) -
row
_ size (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 5 feature (11) -
rubygems
/ commands / uninstall _ command (11) -
rubygems
/ commands / unpack _ command (11) - run (79)
-
run
_ config (6) -
run
_ test _ suites (1) - running? (7)
-
runtime
_ dependencies (11) -
safe
_ unlink (11) -
save
_ rounding _ mode (11) - scan (11)
-
scan
_ until (11) -
send
_ io (11) -
set
_ trace _ func (22) -
setup
_ argv (1) -
singleton
_ method _ undefined (11) -
skip
_ until (11) - skips (1)
-
sockaddr
_ un (11) - socket (11)
- socketpair (11)
-
source
_ encoding (11) -
source
_ encoding _ name (11) -
source
_ location (11) - spec (11)
- start (44)
-
start
_ time (1) - status (1)
- sunday? (22)
-
super
_ method (10) - sym (22)
-
sync
_ ex _ count (6) -
sync
_ synchronize (6) -
sync
_ unlock (6) - synchronize (6)
- sysaccept (11)
- tag (10)
-
test
/ unit (11) -
test
_ count (1) -
test
_ methods (1) -
test
_ order (1) -
test
_ suites (1) -
to
_ i (11) -
to
_ s (21) -
trace
_ func (33) - truncate (139)
-
try
_ func (22) -
try
_ run (22) - umount (11)
- un (11)
- unadvise (11)
-
unalias
_ command (12) - uname (22)
- unbind (11)
-
unconverted
_ fields? (11) -
undef
_ method (11) -
undef
_ system _ command (12) -
undefine
_ finalizer (11) - undump (7)
- unescape (40)
- unescapeElement (11)
- unescapeHTML (11)
-
unescape
_ element (11) -
unescape
_ filename? (11) -
unescape
_ html (11) - ungetbyte (22)
- ungetc (44)
-
unicode
_ normalize (10) -
unicode
_ normalize! (10) -
unicode
_ normalized? (10) - union (39)
- uniq (60)
- uniq! (22)
- unique (9)
-
unique
_ id (11) - unit (11)
- unitary? (11)
- unix (33)
- unix? (11)
-
unix
_ path (11) -
unix
_ rights (22) -
unix
_ server _ loop (11) -
unix
_ server _ socket (22) - unknown (44)
- unknown? (11)
- unlink (62)
- unlock (39)
-
unmatched
_ alias _ lists (11) - unmount (11)
- unnormalize (11)
- unnormalized (11)
- unpack (22)
- unpack1 (8)
-
unpack
_ sockaddr _ in (11) -
unpack
_ sockaddr _ un (11) - unparse (11)
-
unparsed
_ uri (11) - unscan (11)
- unshift (33)
- unsubscribe (11)
- untaint (9)
-
untrace
_ var (11) - untrust (9)
- untrusted? (9)
- unused (11)
-
unused
_ bits (11) -
upper
_ bound (11) - value (10)
-
wait
_ until (11) -
warn
_ unless _ e _ option (11) -
warning
_ unless _ e _ option (11) - write (11)
- written (11)
検索結果
先頭5件
-
Enumerable
# chunk {|elt| . . . } -> Enumerator (6260.0) -
要素を前から順にブロックで評価し、その結果によって 要素をチャンクに分けた(グループ化した)要素を持つ Enumerator を返します。
...クの要素を持つ配列のペアを各要素とします。
そのため、eachだと以下のようになります。
//emlist[][ruby]{
enum.chunk {|elt| key }.each {|key, ary| do_something }
//}
例として、整数列を連続する奇数/偶数に分ける例を見てみます。
「n.eve......」の値が切り替わるところで区切られているのがわかるでしょう。
//emlist[例][ruby]{
[3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5].chunk {|n|
n.even?
}.each {|even, ary|
p [even, ary]
}
# => [false, [3, 1]]
# [true, [4]]
# [false, [1, 5, 9]]
# [true, [2, 6]]
# [false,......ruby]{
# ファイルのエンコーディングは実際のファイルに合わせてください。
open("/usr/share/dict/words", "r:iso-8859-1") {|f|
f.chunk {|line| line[0].upcase }.each {|ch, lines| p [ch, lines.length] }
}
# => ["A", 17096]
# ["B", 11070]
# ["C", 19901]
# ["D", 108... -
RDoc
:: Options # dry _ run -> bool (6248.0) -
コマンドライン引数の --dry-run オプションを指定していた場合、true を返 します。--no-dry-run オプションを指定していた場合、false を返します。
...コマンドライン引数の --dry-run オプションを指定していた場合、true を返
します。--no-dry-run オプションを指定していた場合、false を返します。
どちらも指定しなかった場合は false を返します。... -
String
# unicode _ normalize(form = :nfc) -> String (6248.0) -
self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し た文字列を返します。
...の正規化形式で Unicode 正規化し
た文字列を返します。
@param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定しま
す。省略した場合は :nfc になります。
@raise Encoding::CompatibilityError self が Unicode 文字列では......ドでの "Unicode 文字列" とは、UTF-8、UTF-16BE/LE、
UTF-32BE/LE だけではなく GB18030、UCS_2BE、and UCS_4BE を含みます。
また、self が UTF-8 以外のエンコーディングであった場合は一度 UTF-8 に変
換してから正規化されるため、UTF-8 よりも......。
//emlist[例][ruby]{
"a\u0300".unicode_normalize # => 'à' ("\u00E0" と同じ)
"a\u0300".unicode_normalize(:nfc) # => 'à' ("\u00E0" と同じ)
"\u00E0".unicode_normalize(:nfd) # => 'à' ("a\u0300" と同じ)
"\xE0".force_encoding('ISO-8859-1').unicode_normalize(:nfd)... -
Thread
# set _ trace _ func(pr) -> Proc | nil (6242.0) -
スレッドにトレース用ハンドラを設定します。
...to_s
Thread.current.set_trace_func nil
3.to_s
end
th.set_trace_func lambda {|*arg| p arg }
th.join
# => ["line", "example.rb", 2, nil, #<Binding:0x00007fc8de87cb08>, nil]
# => ["c-call", "example.rb", 2, :inherited, #<Binding:0x00007fc8de886770>, Class]
# => ["c-return", "example.rb", 2, :inher......x00007fc8de88c440>, nil]
# => ["c-call", "example.rb", 4, :to_s, #<Binding:0x00007fc8de896f30>, Integer]
# => ["c-return", "example.rb", 4, :to_s, #<Binding:0x00007fc8de894a50>, Integer]
# => ["line", "example.rb", 5, nil, #<Binding:0x00007fc8de967b08>, nil]
# => ["c-call", "example.rb", 5, :current......["c-return", "example.rb", 5, :current, #<Binding:0x00007fc8de9673b0>, Thread]
# => ["c-call", "example.rb", 5, :set_trace_func, #<Binding:0x00007fc8de966fc8>, Thread]
//}
@param pr トレースハンドラ(Proc オブジェクト) もしくは nil
@see Thread#add_trace_func Kernel.#set_trace_func... -
Rational
# round(precision = 0) -> Integer | Rational (6236.0) -
自身ともっとも近い整数を返します。
....5, -0.5 はそれぞれ 1,-1 に切り上げされます。
@param precision 計算結果の精度
@raise TypeError precision に整数以外のものを指定すると発生します。
//emlist[例][ruby]{
Rational(3).round # => 3
Rational(2, 3).round # => 1
Rational(-3, 2).round # => -2......y]{
Rational('-123.456').round(+1) # => (-247/2)
Rational('-123.456').round(+1).to_f # => -123.5
Rational('-123.456').round(0) # => -123
Rational('-123.456').round(-1) # => -120
Rational('-123.456').round(-2) # => -100
//}
@see Rational#ceil, Rational#floor, Rational#truncate... -
URI
:: UNSAFE -> Regexp (6232.0) -
URIとして指定できない文字にマッチする正規表現 /[^-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]/n です。
...URIとして指定できない文字にマッチする正規表現
/[^-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]/n
です。... -
Enumerable
# chunk _ while {|elt _ before , elt _ after| . . . } -> Enumerator (6230.0) -
要素を前から順にブロックで評価し、その結果によって要素をチャンクに分け た(グループ化した)要素を持つEnumerator を返します。
...。
ブロックは self の長さ - 1 回呼び出されます。
@return チャンクごとの配列をブロックパラメータに渡す Enumerator
を返します。eachメソッドは以下のように呼び出します。
//emlist{
enum.chunk_while { |elt_before, elt_after| bool......15,16,19,20,21]
b = a.chunk_while {|i, j| i+1 == j }
p b.to_a # => [[1, 2], [4], [9, 10, 11, 12], [15, 16], [19, 20, 21]]
c = b.map {|a| a.length < 3 ? a : "#{a.first}-#{a.last}" }
p c # => [[1, 2], [4], "9-12", [15, 16], "19-21"]
d = c.join(",")
p d # => "1,2,4,9-12,15,16,19-21"
# 増加のみの......2, 7, 5, 9, 5]
p a.chunk_while {|i, j| i <= j }.to_a
# => [[0, 9], [2, 2, 3], [2, 7], [5, 9], [5]]
# 隣り合う偶数同士、奇数同士の部分配列ごとに分ける。
# (Enumerable#chunk を使って実現する事も可能)
a = [7, 5, 9, 2, 0, 7, 9, 4, 2, 0]
p a.chunk_while {|i, j| i.eve... -
Regexp
. union(*pattern) -> Regexp (6230.0) -
引数として与えた pattern を選択 | で連結し、Regexp として返します。 結果の Regexp は与えた pattern のどれかにマッチする場合にマッチするものになります。
....union(/a/, /b/, /c/) # => /(?-mix:a)|(?-mix:b)|(?-mix:c)/
//}
引数を一つだけ与える場合は、Array を与えても Regexp を生成します。
つまり、以下のように書くことができます。
//emlist[][ruby]{
arr = [/a/, /b/, /c/]
p Regexp.union(arr) # => /(?-mix:a)|(?-m......ix:b)|(?-mix:c)/
# 1.8.7 より前は、以下のように書く必要があった
p Regexp.union(*arr) # => /(?-mix:a)|(?-mix:b)|(?-mix:c)/
//}
pattern は Regexp または String で与えます。
String で与えた場合、それ自身と等しい文字列にマッチするものと解釈さ......れます。
//emlist[][ruby]{
p Regexp.union("a", "?", "b") # => /a|\?|b/
p Regexp.union(/a/, "*") # => /(?-mix:a)|\*/
//}
引数をひとつも与えなかった場合、決してマッチしない Regexp を返します。
//emlist[][ruby]{
p Regexp.union() # => /(?!)/
//}
結果の Regexp... -
Net
:: HTTPHeader # chunked? -> bool (6228.0) -
Transfer-Encoding: ヘッダフィールドが "chunked" である 場合に真を返します。
...Transfer-Encoding: ヘッダフィールドが "chunked" である
場合に真を返します。
Transfer-Encoding: ヘッダフィールドが存在しなかったり、
"chunked" 以外である場合には偽を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://ww......w.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.chunked? # => false
req["Transfer-Encoding"] = "chunked"
req.chunked? # => true
//}... -
Integer
# round(ndigits = 0 , half: :up) -> Integer (6224.0) -
self ともっとも近い整数を返します。
...{
1.round # => 1
1.round(2) # => 1
15.round(-1) # => 20
(-15).round(-1) # => -20
25.round(-1, half: :up) # => 30
25.round(-1, half: :down) # => 20
25.round(-1, half: :even) # => 20
35.round(-1, half: :up) # => 40
35.round(-1, half: :down) # => 30
35.round(-1, hal......f: :even) # => 40
(-25).round(-1, half: :up) # => -30
(-25).round(-1, half: :down) # => -20
(-25).round(-1, half: :even) # => -20
//}
@see Numeric#round...