るりまサーチ

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

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric rect
  4. numeric coerce
  5. numeric to_int

ライブラリ

クラス

検索結果

Integer#times -> Enumerator (18132.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 (18132.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...

Numeric (6148.0)

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

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

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッドは、サブクラスで...
...o - - -
Numeric
Integer Fixnum Bignum Float Rational Complex
-------------------------------------------------------------------------------------------
step
| o - -...
...- - - -
succ | - o o - - - -
times
| - o - - - - -
to_c | o - - -...
...size | - o - - -
step
| o - - - -
succ | - o - - -
times
| - o - - -...
..._c | o - - - o
to_f | - o o o o
Numeric
Integer Float Rational Complex
--------------------------------------------------------------------------------...

1.6.8から1.8.0への変更点(まとめ) (144.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]...
...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?...
...ThreadGroup に Thread を追加/削除できなくなりました。

=== Time

: ((<Process/Process.times>)) [change]
((<Time/Time.times>)) から移動しました。
(Time.times も残っていますが、warningが出ます)

: ((<Time#to_a|Time/to_a>)) [change]
: ((<Time#z...

NEWS for Ruby 2.5.0 (30.0)

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

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

* Numeric
* Numeric#step は > で0と比較できない引数が与えられたときcoerce内部で発生したエラーを隠蔽しないようになりま...
...りました。
coerceがnilを返す場合、変換は不可能です。7688

* Process
* getrusage(2) が存在する場合 Process.#times の精度を改良しました 11952
* Process.last_status を追加。$? と同じです 14043

* Range
* Range.new no longer hides exce...
...l/326
* Make frozen string literal = true
https://github.com/ruby/psych/pull/320
* Preserve time zone offset when deserializing times
https://github.com/ruby/psych/pull/316
* Remove deprecated method aliases for syck gem
https://github.com/ruby/psych/pull/31...

絞り込み条件を変える

NEWS for Ruby 3.0.0 (24.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...
...partitioning cold paths.
* Instance variables
* Eliminate some redundant checks.
* Skip checking a class and a object multiple times in a method when possible.
* Optimize accesses in some core classes like Hash and their subclasses.
* Method inlining support for some...

Integer#downto(min) -> Enumerator (18.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 (18.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#upto(max) -> Enumerator (18.0)

self から max まで 1 ずつ増やしながら繰り返します。 self > max であれば何もしません。

...self から max まで 1 ずつ増やしながら繰り返します。
self > max であれば何もしません。

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

//emlist[][ruby]{
5.upto(10) {|i| print i, " " } # => 5 6 7 8 9 10
//}

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

Integer#upto(max) {|n| ... } -> Integer (18.0)

self から max まで 1 ずつ増やしながら繰り返します。 self > max であれば何もしません。

...self から max まで 1 ずつ増やしながら繰り返します。
self > max であれば何もしません。

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

//emlist[][ruby]{
5.upto(10) {|i| print i, " " } # => 5 6 7 8 9 10
//}

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

絞り込み条件を変える