別のキーワード
種類
- インスタンスメソッド (565)
- 文書 (56)
- クラス (31)
- ライブラリ (30)
- 特異メソッド (12)
クラス
- Date (72)
-
Enumerator
:: ArithmeticSequence (21) -
Enumerator
:: Lazy (274) - Integer (72)
- Numeric (93)
- Range (45)
キーワード
- % (14)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - == (7)
- ArithmeticSequence (7)
- Lazy (12)
-
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (5) - Numeric (12)
- chunk (24)
- collect (12)
- debug (12)
- downto (48)
- drop (12)
-
drop
_ while (12) - filter (7)
-
filter
_ map (6) -
find
_ all (12) - force (12)
- hash (7)
- map (12)
- new (12)
- profile (6)
- rake (12)
- reject (12)
-
ruby 1
. 6 feature (12) - select (12)
-
slice
_ after (22) -
slice
_ before (36) -
slice
_ when (11) - take (12)
-
take
_ while (24) - times (24)
- upto (48)
- zip (24)
検索結果
先頭5件
-
Integer
# downto(min) {|n| . . . } -> self (6.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 (6.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 (6.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
# upto(max) -> Enumerator (6.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 (6.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... -
NEWS for Ruby 2
. 1 . 0 (6.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ソッドになりました
* Mutex
* Mutex#owned? はもはや実験的な機能ではありません。
* Numeric
* 拡張: Numeric#step limit が省略可能になり無限数列を作れるようになりました。
キーワード引数の to と by を使いやすさのた... -
NEWS for Ruby 2
. 5 . 0 (6.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...d, Module#alias_method, Module#undef_method, Module#remove_method はパブリックメソッドになりました 14133
* Numeric
* Numeric#step は > で0と比較できない引数が与えられたときcoerce内部で発生したエラーを隠蔽しないようになりました。... -
NEWS for Ruby 3
. 0 . 0 (6.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)... -
Numeric (6.0)
-
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
...um Float Rational Complex
-------------------------------------------------------------------------------------------
step | o - - - - - -
succ | - o o......d_added | o - - - -
size | - o - - -
step | o - - - -
succ | - o - - -... -
profile (6.0)
-
Ruby プログラムのためのプロファイラです。 プロファイラとは効率改善のための調査に用いられるツールのことです。 profile ライブラリは各メソッドの実行時間に関する統計を出力します。
...self total
time seconds seconds calls ms/call ms/call name
33.87 1.49 1.49 11 135.65 214.49 Fixnum#step
31.38 2.88 1.38 2410 0.57 0.57 Array#[]=
27.84 4.10 1.23 2 613.28 2070.31 Range#each
4.26 4...