るりまサーチ

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

別のキーワード

  1. _builtin numeric
  2. numeric imag
  3. numeric conj
  4. numeric eql?

検索結果

<< < 1 2 3 > >>

Numeric (6142.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...スです。Integer や Float などの数値クラス
Numeric のサブクラスとして実装されています。

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッドは、サブクラスで...
...提供されているメソッド
(+, -, *, /, %) を利用して定義されるものがほとんどです。
つまり Numeric で定義されているメソッドは、Numeric のサブクラスとして新たに数値クラスを定義した時に、
演算メソッド(+, -, *, /, %, <=>, coerce...
...d_added | o - - - -
size | - o - - -
step
| o - - - -
succ | - o - - -...

1.6.8から1.8.0への変更点(まとめ) (114.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...r|File::Stat/rdev_major>)) [new]
: ((<File::Stat#rdev_minor|File::Stat/rdev_minor>)) [new]

追加

=== Float

: ((<Numeric#to_int|Numeric/to_int>)) [new]
: ((<Float#to_int|Numeric/to_int>)) [new]

追加。

=== Hash

: ((<Hash#merge|Hash/merge>)) [new]
: ((<Hash#merge!|Hash/merge!>)) [new]...
...ror/name>)) [new]

追加

=== NilClass

: ((<NilClass#to_f|NilClass/to_f>)) [new]

追加

=== Numeric

: ((<Numeric#div|Numeric/div>)) [new]
: ((<Numeric#quo|Numeric/quo>)) [new]

追加 ((<ruby-dev:19423>))

((<ruby-dev:20962>))

* div - 整除(divmodの第一要...
...ocess.waitall>)) [new]
追加

: ((<Process::Status#pid|Process::Status/pid>)) [new]

追加

=== Range

: ((<Range#step|Range/step>)) [new]

追加。step ごとの要素で繰り返します。

: ((<Range#include?|Range/include?>)) [new]
: ((<Range#member?|Range/member?...

NEWS for Ruby 2.6.0 (42.0)

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

...
Python のスライスのようなものを表現するために使えます。
このクラスのインスタンスは Numeric#step や Range#step で得られます。

* Enumerator::Chain
* 1個の Enumerator で複数の Enumerable の連鎖を表現する新しいクラス...
...iver オプションが追加されて
Ruby コードからも設定できるようになりました。 14313

* Numeric
* 非互換な変更
* Numeric#step が Enumerator クラスのインスタンスではなく
Enumerator::ArithmeticSequence クラスのインスタ...
...うになりました。 14575
* Range#cover? が Range オブジェクトを受け付けるようになりました。 14473
* Range#step が Enumerator クラスのインスタンスではなく
Enumerator::ArithmeticSequence クラスのインスタンスを返すようにな...

ruby 1.6 feature (36.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...02-04-10) [i586-linux]

: 2002-04-04: Integer#((<Integer/step>))

第二引数が 1 よりも小さい場合に 0 を指定したと見なされエラーになって
いました。

1.step(2, 0.1) {|f| p f }

=> -:1:in `step': step cannot be 0 (ArgumentError)
from -:1...
...)

p(-1[-1])

=> ruby 1.6.5 (2001-09-19) [i586-linux]
1
=> ruby 1.6.5 (2001-11-01) [i586-linux]
1

: Numeric#remainder

((<ruby-bugs-ja:PR#110>))

p( 3.remainder(-3))
p(-3.remainder(3))

=> ruby 1.6.5 (2001-09-19) [i586-linux]...
...end
}

=> ruby 1.6.5 (2001-09-19) [i586-linux]
NotImplementedError
MatchData
Exception
Numeric

MatchData
Segmentation fault

=> ruby 1.6.5 (2001-10-15) [i586-linux]
MatchData
NotImpl...

NEWS for Ruby 2.1.0 (24.0)

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

...ブリックメソッドになりました

* Mutex
* Mutex#owned? はもはや実験的な機能ではありません。

* Numeric
* 拡張: Numeric#step limit が省略可能になり無限数列を作れるようになりました。
キーワード引数の to と by を使い...
...* 定義したメソッドの名前をシンボルで返すようになりました。メソッドオブジェクトではありません。

* Numeric#quo
* レシーバーが to_r メソッドを持たないとき ArgumentError ではなく TypeError を発生させるようになりまし...

絞り込み条件を変える

Enumerator::ArithmeticSequence (18.0)

等差数列を提供するためのクラス。

...等差数列を提供するためのクラス。

ArithmeticSequenceオブジェクトは、Numeric#step, Range#step によって生成されます。...

NEWS for Ruby 2.5.0 (18.0)

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

...define_method, Module#alias_method, Module#undef_method, Module#remove_method はパブリックメソッドになりました 14133

* Numeric
* Numeric#step は > で0と比較できない引数が与えられたときcoerce内部で発生したエラーを隠蔽しないようになりま...
...ms.org/2017/10/09/2.6.14-released.html
* https://blog.rubygems.org/2017/08/27/2.6.13-released.html

* securerandom
* SecureRandom.alphanumeric を追加

* set
* Set#to_s を Set#inspect の別名として追加 13676
* Set#=== を Set#include? の別名として追加 13801...

NEWS for Ruby 3.0.0 (18.0)

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

...* Can be sliced with Enumerator::ArithmeticSequence

//emlist[][ruby]{
dirty_data = ['--', 'data1', '--', 'data2', '--', 'data3']
dirty_data[(1..).step(2)] # take each second element
# => ["data1", "data2", "data3"]
//}

* Binding
* Binding#eval when called with one argument will use `"(eval)...
...pipe, no broken pipe error message will be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modify Regexp.last_match. 17...
...low compilations.
* Memory view interface [EXPERIMENTAL]
* The memory view interface is a C-API set to exchange a raw memory area, such as a numeric array or a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the...

Integer#downto(min) -> Enumerator (12.0)

self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。

...で 1 ずつ減らしながらブロックを繰り返し実行します。
self < min であれば何もしません。

@param min 数値
@return self を返します。

//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}

@see Integer#upto, Numeric#step, Integer#times...

Integer#downto(min) {|n| ... } -> self (12.0)

self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。

...で 1 ずつ減らしながらブロックを繰り返し実行します。
self < min であれば何もしません。

@param min 数値
@return self を返します。

//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}

@see Integer#upto, Numeric#step, Integer#times...

絞り込み条件を変える

Integer#times -> Enumerator (12.0)

self 回だけ繰り返します。 self が正の整数でない場合は何もしません。

...れます。

//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}

@see Integer#upto, Integer#downto, Numeric#step...

Integer#times {|n| ... } -> self (12.0)

self 回だけ繰り返します。 self が正の整数でない場合は何もしません。

...れます。

//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}

@see Integer#upto, Integer#downto, Numeric#step...
<< < 1 2 3 > >>