るりまサーチ

最速Rubyリファレンスマニュアル検索!
95件ヒット [1-95件を表示] (0.055秒)

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer times
  5. integer new

検索結果

Net::IMAP::BodyTypeMessage#lines -> Integer (18202.0)

ボディのテキストの行数を返します。

ボディのテキストの行数を返します。

Net::IMAP::BodyTypeText#lines -> Integer (18202.0)

ボディの行数を返します。

ボディの行数を返します。

String#count(*chars) -> Integer (119.0)

chars で指定された文字が文字列 self にいくつあるか数えます。

...nt('2-8', '^4-6') # => 4

# ファイルの行数を数える
n_lines = File.read("foo").count("\n")

# ファイルの末尾に改行コードがない場合にも対処する
buf = File.read("foo")
n_lines = buf.count("\n")
n_lines += 1 if /[^\n]\z/ =~ buf
# if /\n\z/ !~ buf だと空...

NEWS for Ruby 2.4.0 (108.0)

NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...加 12512

* Integer
* Fixnum と Bignum は Integer に統合されました 12005
* Integer#ceil, Integer#floor, Integer#truncate は
Integer
#round と同じように省略可能な桁を指定する引数を受け付けるようになりました 12245
* Integer#digits を追...
...のメソッドです。
* Integer#round は half というキーワード引数を受け付けるようになりました。
half には :even, :up, :down が指定可能です。 12548 12958 12953

* IO
* IO#gets, IO#readline, IO#each_line, IO#readlines, IO.foreach は
chomp...
...を追加 12786
* String#concat, String#prepend 複数の引数を受け付けるようになりました 12333
* String#each_line, String#lines 省略可能なキーワード引数 chomp を受け付けるようになりました 12553
* String#match? を追加 12898
* String#unpac...

NEWS for Ruby 2.5.0 (78.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...う。 13405

* Integer
* Integer#round, Integer#floor, Integer#ceil, Integer#truncate は常に Integer を返すようになりました
13420
* Integer#pow を追加 12508 11003
* Integer#allbits?, Integer#anybits?, Integer#nobits? を追加 12753
* Integer.sqrt を追加...
...overage.start(lines: true, branches: true, methods: true)
//}
* Rubyで書かれたファイルをいくつか読み込んでから、Coverage.result を使って結果を取得することができます。
//emlist[][ruby]{
Coverage.result
#=> { "/path/to/file.rb"=>
# { :lines => [1, 2, 0,...

絞り込み条件を変える

Array#pack(template) -> String (30.0)

配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。

...] # 仮数部
//}

そして、s, e, f の意味は以下の通りです。
//emlist[][ruby]{
sgn = s == "0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-126-23...
...,52] # 仮数部
//}

そして、s, e, f の意味は以下の通りです。
//emlist[][ruby]{
sgn = s == "0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-1022-5...
...pack('ccxxcc') # => [82, 117, 98, 121]
//}

: Hexダンプを数値の配列に変換する例
//emlist[][ruby]{
"61 62 63 64 65 66".delete(' ').lines.pack('H*').unpack('C*')
# => [97, 98, 99, 100, 101, 102]

"61 62 63 64 65 66".split.collect {|c| c.hex}
# => [97, 98, 99, 100, 101, 102]
//}

:...

Array#pack(template, buffer: String.new) -> String (30.0)

配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。

...] # 仮数部
//}

そして、s, e, f の意味は以下の通りです。
//emlist[][ruby]{
sgn = s == "0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-126-23...
...,52] # 仮数部
//}

そして、s, e, f の意味は以下の通りです。
//emlist[][ruby]{
sgn = s == "0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-1022-5...
...pack('ccxxcc') # => [82, 117, 98, 121]
//}

: Hexダンプを数値の配列に変換する例
//emlist[][ruby]{
"61 62 63 64 65 66".delete(' ').lines.pack('H*').unpack('C*')
# => [97, 98, 99, 100, 101, 102]

"61 62 63 64 65 66".split.collect {|c| c.hex}
# => [97, 98, 99, 100, 101, 102]
//}

:...

String#unpack(template) -> Array (30.0)

Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。

...] # 仮数部
//}

そして、s, e, f の意味は以下の通りです。
//emlist[][ruby]{
sgn = s == "0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-126-23...
...,52] # 仮数部
//}

そして、s, e, f の意味は以下の通りです。
//emlist[][ruby]{
sgn = s == "0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-1022-5...
...pack('ccxxcc') # => [82, 117, 98, 121]
//}

: Hexダンプを数値の配列に変換する例
//emlist[][ruby]{
"61 62 63 64 65 66".delete(' ').lines.pack('H*').unpack('C*')
# => [97, 98, 99, 100, 101, 102]

"61 62 63 64 65 66".split.collect {|c| c.hex}
# => [97, 98, 99, 100, 101, 102]
//}

:...

pack テンプレート文字列 (30.0)

pack テンプレート文字列

...] # 仮数部
//}

そして、s, e, f の意味は以下の通りです。
//emlist[][ruby]{
sgn = s == "0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-126-23...
...,52] # 仮数部
//}

そして、s, e, f の意味は以下の通りです。
//emlist[][ruby]{
sgn = s == "0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-1022-5...
...pack('ccxxcc') # => [82, 117, 98, 121]
//}

: Hexダンプを数値の配列に変換する例
//emlist[][ruby]{
"61 62 63 64 65 66".delete(' ').lines.pack('H*').unpack('C*')
# => [97, 98, 99, 100, 101, 102]

"61 62 63 64 65 66".split.collect {|c| c.hex}
# => [97, 98, 99, 100, 101, 102]
//}

:...

NEWS for Ruby 2.6.0 (18.0)

NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...が Object#yield_self の別名として追加されました。 14594
* 新規オプション
* Kernel.#Complex, Kernel.#Float, Kernel.#Integer,
Kernel.#Rational にエラー処理方法を指定する :exception オプションが
追加されました。 12732
* Ke...
...r が標準添付ライブラリに追加されました。 12733
* 最新安定版の 1.17.2 が使われます。

* Coverage
* oneshot_lines モードが追加されました。 15022
* このモードは「各行が何回実行されたか」の代わりに
「各行が少...
...ラグが削除されます。
言い換えるとオーバーヘッドがなくなります。
* 新規オプション
* :oneshot_lines キーワード引数が Coverage.start に追加されました。
* :stop と :clear キーワード引数が Coverage.result に追加さ...

絞り込み条件を変える