るりまサーチ

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

別のキーワード

  1. date upto
  2. _builtin upto
  3. integer upto
  4. string upto
  5. macros log_upto

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Integer#upto(max) -> Enumerator (18108.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 (18108.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...

String#upto(max, exclusive = false) {|s| ... } -> self (18107.0)

self から始めて max まで 「次の文字列」を順番にブロックに与えて繰り返します。 「次」の定義については String#succ を参照してください。

...以下のコードは a, b, c, ... z, aa, ... az, ..., za を
出力します。

//emlist[][ruby]{
("a" .. "za").each do |str|
puts str
end
'a'.upto('za') do |str|
puts str
end
//}

@param max 繰り返しをやめる文字列

@param exclusive max を含むかどうか。false の場合は...

Date#upto(max) -> Enumerator (18102.0)

このメソッドは、step(max, 1){|date| ...} と等価です。

このメソッドは、step(max, 1){|date| ...} と等価です。

@param max 日付オブジェクト

@see Date#step, Date#downto

Date#upto(max) {|date| ...} -> self (18102.0)

このメソッドは、step(max, 1){|date| ...} と等価です。

このメソッドは、step(max, 1){|date| ...} と等価です。

@param max 日付オブジェクト

@see Date#step, Date#downto

絞り込み条件を変える

Syslog::Macros.#LOG_UPTO(priority) -> Integer (6107.0)

priorityまでのすべての優先度のマスクを作成します。

...のすべての優先度のマスクを作成します。

@param priority priority は優先度を示す定数を指定します。
詳しくは、Syslog::Levelを参照してください。

例:
require 'syslog'
Syslog.mask = Syslog::LOG_UPTO(Syslog::LOG_ERR)...

FileUtils.#uptodate?(newer, older_list, options = nil) -> bool (6100.0)

newer が、older_list に含まれるすべてのファイルより新しいとき真。 存在しないファイルは無限に古いとみなされます。

...@param options どのようなオプションも指定することはできません。

@raise ArgumentError options にオプションを指定した場合に発生します。

//emlist[][ruby]{
require 'fileutils'
FileUtils.uptodate?('hello.o', ['hello.c', 'hello.h']) or system('make')
//}...

Benchmark.#bm(label_width = 0, *labels) {|rep| ... } -> [Benchmark::Tms] (42.0)

Benchmark.#benchmark メソッドの引数を簡略化したものです。

...ire 'benchmark'

n = 50000
Benchmark.bm do |x|
x.report { for i in 1..n; a = "1"; end }
x.report { n.times do ; a = "1"; end }
x.report { 1.upto(n) do ; a = "1"; end }
end

#=>
#
# user system total real
# 1.033333 0.016667 1.016667 ( 0.492106)
# 1.483333 0.000000...
...times do ; a = "1"; end }
x.report("upto:") { 1.upto(n) do ; a = "1"; end }
end

#=>
# user system total real
# for: 1.050000 0.000000 1.050000 ( 0.503462)
# times: 1.533333 0.016667 1.550000 ( 0.735473)
# upto: 1.500000 0.016667 1.516667 ( 0...
...}
tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
[tf + tt + tu, (tf + tt + tu) / 3]
end

#=>
# user system total real
# for: 0.001467 0.004727 0.006194 ( 0.006193)
# times: 0.003814 0.000000 0.003814 ( 0.003814)
# upto: 0.003855 0.0...

1.6.8から1.8.0への変更点(まとめ) (30.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への変更点(まとめ)/サポートプラットフォームの追加>))

...586-linux]
3
nil
=> ruby 1.8.0 (2003-07-03) [i586-linux]
nil
nil

: ((<String#upto|String/upto>)) [bug]

String#upto の範囲チェックが辞書順だったバグが修正されました。
現在は、((<String/succ>)) の動作と一致し...
...2-12-24) [i586-linux]
["a"]
=> ruby 1.8.0 (2003-07-03) [i586-linux]
["a", "b", "c", ..., "y", "z", "aa"]

'a'.upto('aa') {|c| p c}
=> ruby 1.6.8 (2002-12-24) [i586-linux]
"a"
=> ruby 1.8.0 (2003-07-03) [i586-linux]
"a"...
..."c"
:
"y"
"z"
"aa"

以前の実装では以下が 'aa' を含まないとか

'a'.upto('b') {|c| p c}
=> ruby 1.6.8 (2002-12-24) [i586-linux]
"a"
"b"
=> ruby 1.8.0 (2003-07-03) [i586-linux]...

Benchmark.#benchmark(caption = "", label_width = nil, fmtstr = nil, *labels) {|rep| ...} -> [Benchmark::Tms] (18.0)

Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。

...; end }
tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }

[tf+tt+tu, (tf+tt+tu)/3]
end

#=>
#
# user system total real
# for: 1.016667 0.016667 1.033333 ( 0.485749)
# times: 1.450000 0.016667 1.466667 ( 0.681367)
# upto: 1.533333 0.000000...

絞り込み条件を変える

<< 1 2 3 ... > >>