別のキーワード
ライブラリ
クラス
-
ARGF
. class (12) - Array (21)
- CGI (12)
- Data (12)
- Float (60)
- IO (12)
-
Net
:: IMAP (106) -
Net
:: IMAP :: FetchData (12) -
Net
:: IMAP :: ThreadMember (12) -
Net
:: POPMail (36) - Object (12)
- Proc (24)
-
RDoc
:: Options (36) - Random (24)
- SignalException (36)
- Socket (36)
- String (24)
- Struct (12)
- Symbol (12)
- Tracer (24)
-
WEBrick
:: Cookie (12)
モジュール
- Etc (12)
- JSON (12)
- Kernel (85)
- OpenSSL (12)
- SecureRandom (12)
-
Socket
:: Constants (36)
キーワード
-
$ INPUT _ LINE _ NUMBER (12) -
$ NR (12) - % (12)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - ArgumentError (12)
- FloatDomainError (12)
-
IP
_ MAX _ MEMBERSHIPS (24) -
MAX
_ MULTIPART _ COUNT (12) - NAN (12)
-
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (5) - NaN (12)
-
OPENSSL
_ VERSION _ NUMBER (12) - Proc (12)
- Ruby用語集 (12)
-
TCP
_ KEEPCNT (24) -
TCP
_ SYNCNT (24) - [] (9)
-
all
_ symbols (12) - angle (12)
- arg (12)
- bigdecimal (12)
- copy (12)
- curry (24)
- expunge (12)
- fetch (12)
- format (12)
- getoptlong (12)
-
include
_ line _ numbers (12) - lambda (18)
-
line
_ numbers (12) -
line
_ numbers= (12) - lineno= (24)
- move (10)
- nan? (12)
-
net
/ imap (12) - new (51)
- pack (21)
- pack テンプレート文字列 (12)
- parse (12)
- phase (12)
- proc (19)
-
random
_ number (12) -
rubygems
/ commands / generate _ index _ command (12) - search (12)
- seqno (24)
-
set
_ get _ line _ procs (24) - sort (12)
- sprintf (12)
- sprintf フォーマット (12)
- srand (24)
- store (12)
- sysconf (12)
-
to
_ s (12) -
uid
_ sort (12) -
uid
_ thread (12) - uidl (12)
-
unique
_ id (12) - unpack (12)
- クラス/メソッドの定義 (12)
- 手続きオブジェクトの挙動の詳細 (12)
- 正規表現 (12)
検索結果
-
pack テンプレート文字列 (36.0)
-
pack テンプレート文字列
...zed number)
end
elsif exp == 255
if fra == 0
sgn * Inf # ±∞ (positive/negative infinity)
else
NaN # 非数 (not a number)
end
else
fra += 1 << 23 # ゲタ
sgn * fra * 2**(exp-127-23) # 正規化数 (normalized number)......ed number)
end
elsif exp == 2047
if fra == 0
sgn * Inf # ±∞ (positive/negative infinity)
else
NaN # 非数 (not a number)
end
else
fra += 1 << 52 # ゲタ
sgn * fra * 2**(exp-1023-52) # 正規化数 (normalized number)... -
正規表現 (36.0)
-
正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references
...タ文字が含まれているならば、それは
メタ文字として認識されます。
//emlist[][ruby]{
number = "(\\d+)"
operator = "(\\+|-|\\*|/)"
/#{number}#{operator}#{number}/.match("43+291")
# => #<MatchData "43+291" 1:"43" 2:"+" 3:"291">
//}
埋め込む文字列をリテラルと......Decimal_Number)
* [:alpha:] 英字 (Letter | Mark)
* [:ascii:] ASCIIに含まれる文字 (0000 - 007F)
* [:blank:] スペースとタブ (Space_Separator | 0009)
* [:cntrl:] 制御文字 (Control | Format | Unassigned | Private_Use | Surrogate)
* [:digit:] 数字 (Decimal_Number)
* [:g......r)
* [:xdigit:] 16進表記で使える文字 (0030 - 0039 | 0041 - 0046 | 0061 - 0066)
* [:word:] 単語構成文字 (Letter | Mark | Decimal_Number | Connector_Punctuation)
これらの POSIX 文字クラスは \s といった省略記法と異なり、
ASCIIコード範囲外の空白など... -
net
/ imap (30.0) -
このライブラリは Internet Message Access Protocol (IMAP) の クライアントライブラリです。2060 を元に 実装されています。
...り)までをセッションと呼びます。
メッセージには2種類の識別子が存在します。message sequence number と
UID です。
message sequence number はメールボックス内の各メッセージに1から順に
振られた番号です。セッション中に処理対......message sequence number は
最後のメッセージの message sequence number+1となります。
メッセージをメールボックスから消した場合には、連番の穴を埋めるように
message sequence number が付け替えられます。
一方、UID はセッションを越え... -
Proc
# curry -> Proc (24.0) -
Procをカリー化します
...ry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] #=> wrong number of arguments (given 4, expected 3)
p b.curry(5) #=> wrong number of arguments (given 5, expected 3)
p b.curry(1) #=> wrong number of arguments (given 1, expected 3)
b = lambda {|x, y, z, *w| (x......0) + w.sum }
p b.curry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] #=> 10
p b.curry(5)[1][2][3][4][5] #=> 15
p b.curry(5)[1, 2][3, 4][5] #=> 15
p b.curry(1) #=> wrong number of arguments (given 1, expected 3+)
b = proc { :foo }
p b.curry[] #=> :foo
//}... -
Proc
# curry(arity) -> Proc (24.0) -
Procをカリー化します
...ry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] #=> wrong number of arguments (given 4, expected 3)
p b.curry(5) #=> wrong number of arguments (given 5, expected 3)
p b.curry(1) #=> wrong number of arguments (given 1, expected 3)
b = lambda {|x, y, z, *w| (x......0) + w.sum }
p b.curry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] #=> 10
p b.curry(5)[1][2][3][4][5] #=> 15
p b.curry(5)[1, 2][3, 4][5] #=> 15
p b.curry(1) #=> wrong number of arguments (given 1, expected 3+)
b = proc { :foo }
p b.curry[] #=> :foo
//}... -
bigdecimal (24.0)
-
bigdecimal は浮動小数点数演算ライブラリです。 任意の精度で 10 進表現された浮動小数点数を扱えます。
...nfinity
BigDecimal("+Infinity") # => Infinity
BigDecimal("-Infinity") # => -Infinity
//}
==== 非数(Not a Number)
0 / 0 のような未定義の計算を行った場合、非数(Not a Number)を表す値を返
します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.0") / BigDecimal("0.......rb][ruby]{
#!/usr/local/bin/ruby
require "bigdecimal"
#
# Calculates 3.1415.... (the number of times that a circle's diameter
# will fit around the circle) using J. Machin's formula.
#
def big_pi(sig) # sig: Number of significant figures
exp = -sig
pi = BigDecimal("0")
two = BigDeci... -
Net
:: IMAP :: FetchData # seqno -> Integer (22.0) -
メッセージの sequence number を返します。
...メッセージの sequence number を返します。
Net::IMAP#uid_fetch、Net::IMAP#uid_storeであっても
UID ではなく、sequence numberを返します。... -
SignalException
. new(sig _ name) -> SignalException (20.0) -
引数で指定したシグナルに関する SignalException オブジェクトを生成して返 します。
...定します。
@param sig_number シグナル番号を指定します。整数以外のオブジェクトを指
定した場合は to_int メソッドによる暗黙の型変換を試み
ます。
//emlist[例][ruby]{
signal_number = Signal.list["INT"]
se = Sig... -
NEWS for Ruby 3
. 0 . 0 (18.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...warning in verbose mode). Additionally, accessing a
class variable from the toplevel scope is now a RuntimeError.
14541
* Assigning to a numbered parameter is now a SyntaxError instead of
a warning.
== Command line options
=== `--help` option
When the environment variable `RUBY_PAG......alidation mechanism. (1) can avoid per-method call synchronization because it only uses atomic operations. See the ticket for more details.
* The number of hashes allocated when using a keyword splat in a method call has been reduced to a maximum of 1, and passing a keyword splat to a method that......tant references are inlined.
* Always generate appropriate code for `==`, `nil?`, and `!` calls depending on a receiver class.
* Reduce the number of PC accesses on branches and method returns.
* Optimize C method calls a little.
* Compilation process improvements
* It does not kee... -
Net
:: IMAP # copy(set , mailbox) -> Net :: IMAP :: TaggedResponse (18.0) -
COPY コマンドを送り、指定したメッセージを 指定したメールボックスの末尾に追加します。
...メールボックスの末尾に追加します。
set でコピーするメッセージを指定します。
message sequence number(整数)、
message sequence numberの配列、もしくは Range で
指定します。コピー元のメールボックスは
Net::IMAP#examine もしくは Net::I......MAP#select で
指定したものを用います。
mailbox はコピー先のメールボックスです。
@param set コピーするメッセージの message sequence number
@param mailbox コピー先のメールボックス(文字列)
@see Net::IMAP#uid_copy...