2468件ヒット
[1-100件を表示]
(0.181秒)
ライブラリ
クラス
- Array (574)
- BigDecimal (36)
- Complex (12)
- Data (6)
- Date (24)
- Enumerator (12)
-
Fiddle
:: Pointer (24) - File (18)
- Float (21)
- Integer (40)
- Module (72)
- Object (24)
-
OpenSSL
:: BN (48) - OpenStruct (12)
- Range (218)
- Rational (60)
- Regexp (12)
-
Socket
:: AncillaryData (36) -
Socket
:: Option (36) - String (12)
- SystemCallError (36)
- UnboundMethod (12)
- Vector (14)
-
WIN32OLE
_ PARAM (12) -
WIN32OLE
_ VARIANT (12) -
Win32
:: Registry (60)
モジュール
- CMath (138)
- Enumerable (144)
- Kernel (175)
- Marshal (48)
- Math (108)
- ObjectSpace (48)
- Singleton (24)
キーワード
-
$ @ (12) -
$ SAFE (7) -
$ ~ (12) - & (12)
- * (24)
- ** (12)
- + (24)
- - (24)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - < (12)
- <= (12)
- <=> (12)
- =~ (24)
- > (12)
- >= (12)
- ArgumentError (12)
- Array (12)
-
Check
_ Type (12) - Float (12)
- Hash (12)
- Integer (24)
-
MAJOR
_ VERSION (12) -
MINOR
_ VERSION (12) - Marshal フォーマット (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 5 . 0 (8) - NUM2INT (12)
- NUM2LONG (12)
- NUM2SHORT (12)
- NUM2UINT (12)
- NUM2ULONG (12)
- NUM2USHORT (12)
- Ruby プログラムの実行 (12)
- String (12)
- [] (48)
- []= (38)
-
_ load (12) -
absolute
_ path? (6) - acos (6)
- acosh (6)
- asin (6)
- asinh (6)
- at (12)
- atan (6)
- atan2 (6)
- atanh (6)
- begin (12)
- bind (12)
- bool (12)
- bsearch (48)
- cbrt (6)
- ceil (12)
- clone (12)
- cmp (12)
- coerce (24)
- combination (24)
- cos (6)
- cosh (6)
-
count
_ nodes (12) -
count
_ objects (12) -
count
_ objects _ size (12) -
count
_ tdata _ objects (12) - cycle (24)
- define (6)
-
define
_ method (48) -
delete
_ at (12) - dig (10)
- dup (16)
- each (24)
- end (12)
- erf (12)
- erfc (12)
- exp (18)
- exp! (6)
- fail (36)
- feed (12)
- fetch (36)
- first (36)
- flatten (12)
- flatten! (12)
- floor (12)
- freeze (6)
- frexp (12)
- gamma (12)
-
initialize
_ copy (12) - insert (12)
- int (24)
- intersection (6)
-
ip
_ pktinfo (12) - join (24)
- last (36)
- ldexp (12)
- lgamma (12)
- linger (12)
- load (12)
- log (36)
- log! (12)
- log10 (6)
- log2 (6)
- max (94)
- min (94)
- mode (24)
- modifiable (12)
- new (60)
- overlap? (2)
- permutation (24)
- pop (12)
- pow (24)
- putc (12)
- raise (36)
-
rb
_ check _ convert _ type (12) -
rb
_ define _ class _ under (12) -
rb
_ singleton _ class (12) - read (12)
-
read
_ bin (12) -
read
_ i (12) -
read
_ s (12) -
repeated
_ combination (24) -
repeated
_ permutation (24) - replace (12)
- restore (12)
-
reverse
_ each (4) - rotate (12)
- rotate! (12)
- round (33)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12) - sample (48)
- shift (12)
- sin (6)
-
singleton
_ class (12) - sinh (6)
- sort (24)
- sqrt (6)
- sum (42)
- tan (6)
- tanh (6)
-
to
_ i (12) -
to
_ ptr (12) - transpose (12)
- truncate (12)
-
try
_ convert (4) - ucmp (12)
-
unix
_ rights (12) - zip (12)
- | (12)
- クラス/メソッドの定義 (12)
- 制御構造 (12)
検索結果
先頭5件
-
TypeError (44000.0)
-
メソッドの引数に期待される型ではないオブジェクトや、期待される振る舞いを持たないオブジェクトが渡された時に発生します。
...メソッドの引数に期待される型ではないオブジェクトや、期待される振る舞いを持たないオブジェクトが渡された時に発生します。
@see ArgumentError... -
Kernel
. # Integer(arg , base = 0) -> Integer (9224.0) -
引数を整数 (Fixnum,Bignum) に変換した結果を返します。
...に対しては arg.to_int, arg.to_i を
この順に使用して変換します。
@param arg 変換対象のオブジェクトです。
@param base 基数として0か2から36の整数を指定します(引数argに文字列を指
定した場合のみ)。省略するか0を指定......数) です。
@raise ArgumentError 整数と見なせない文字列を引数に指定した場合に発生します。
@raise TypeError メソッド to_int, to_i を持たないオブジェクトを引数に指定したか、to_int, to_i
が整数(Integerのサブクラス)を返さ......@raise TypeError 引数に nil を指定した場合に発生します。
//emlist[例][ruby]{
p Integer(4) #=> 4
p Integer(4_000) #=> 4000
p Integer(9.88) #=> 9
p Integer(nil) # can't convert nil into Integer (TypeError)
p Integer(Object.new) # cannot convert Object in... -
Kernel
. # Integer(arg , base = 0 , exception: true) -> Integer | nil (9224.0) -
引数を整数 (Fixnum,Bignum) に変換した結果を返します。
...に対しては arg.to_int, arg.to_i を
この順に使用して変換します。
@param arg 変換対象のオブジェクトです。
@param base 基数として0か2から36の整数を指定します(引数argに文字列を指
定した場合のみ)。省略するか0を指定......す。
@param exception false を指定すると、変換できなかった場合、
例外を発生する代わりに nil を返します。
@raise ArgumentError 整数と見なせない文字列を引数に指定した場合に発生します。
@raise TypeError メソッド to_......(Integerのサブクラス)を返さなかった場合に発生します。
@raise TypeError 引数に nil を指定した場合に発生します。
//emlist[例][ruby]{
p Integer(4) #=> 4
p Integer(4_000) #=> 4000
p Integer(9.88) #=> 9
p Integer(nil) # can't convert ni... -
ObjectSpace
. # count _ objects(result _ hash = {}) -> Hash (9106.0) -
オブジェクトを種類ごとにカウントした結果を Hash として返します。
...am result_hash ハッシュを指定します。与えられたハッシュは上書きして返されます。
これを利用すると測定による影響を避けることができます。
@raise TypeError 引数に Hash 以外を与えた場合、発生します。
//emlis......t[例][ruby]{
ObjectSpace.count_objects # => {:TOTAL=>10000, :FREE=>3011, :T_OBJECT=>6, :T_CLASS=>404, ...}
//}... -
ObjectSpace
. # count _ objects _ size(result _ hash = nil) -> Hash (9106.0) -
型ごとのオブジェクトサイズをバイト単位で格納したハッシュを返します。
...をバイト単位で格納したハッシュを返します。
@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プロー......ます。特に T_DATA の合計値は正しくないでしょう。
//emlist[例][ruby]{
ObjectSpace.count_objects_size
# => {:TOTAL=>1461154, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249, ...}
//}
@raise TypeError result_hash にハッシュ以外を指定した時に発生します。... -
ObjectSpace
. # count _ tdata _ objects(result _ hash = nil) -> Hash (9106.0) -
T_DATA の種類ごとにオブジェクトの数を格納したハッシュを返します。
...m result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プローブ効果を避けるために使用します。
@raise TypeError resul......向けのものです。
//emlist[例][ruby]{
ObjectSpace.count_tdata_objects
# => {RubyVM::InstructionSequence=>504, :parser=>5, :barrier=>6,
# :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99,
# ThreadGroup=>1, Binding=>1, Thread=>1, RubyVM=>1, :iseq=>1,
# Random=>1, ARGF.......class=>1, Data=>1, :autoload=>3, Time=>2}
//}
現在のバージョンでは、戻り値のキーはクラスオブジェクトかシンボルのオブ
ジェクトです。
普通の参照可能なオブジェクトの場合、キーはクラスオブジェクトです。それ
以外の内部的... -
VALUE rb
_ define _ class _ under(VALUE outer , const char *name , VALUE super) (6312.0) -
super のサブクラスとして新しい Ruby クラスを、outer の定数として定義し て返します。
...super のサブクラスとして新しい Ruby クラスを、outer の定数として定義し
て返します。
@param outer 定義するクラスが定数として所属するクラス
@param name クラス名
@param super 継承元のクラス。NULL を指定した場合は Object クラ......ス
@raise TypeError 引数 name と同じ名前の定数が既に存在し、それが
Class オブジェクトではない場合に発生します。......ス
@raise TypeError 引数 name と同じ名前の定数が既に存在し、それが
Class オブジェクトではない場合に発生します。
@raise TypeError 定義済みのクラスと継承元のクラスが一致しない場合に発生
します。... -
CMath
. # exp(z) -> Float | Complex (6240.0) -
z の指数関数(Math::E の z 乗)の値を返します。
...数関数(Math::E の z 乗)の値を返します。
@param z Math::E を z 乗する数を指定します。
@raise TypeError z に数値以外を指定した場合に発生します。
//emlist[例][ruby]{
require "cmath"
CMath.exp(Complex(0, 0))# => (1.0+0.0i)
CMath.exp(Complex(0, Math::PI)) #......=> (-1.0+1.2246063538223773e-16i)
CMath.exp(Complex(0, Math::PI / 2.0)) # => (6.123031769111886e-17+1.0i)
//}... -
Array
# permutation(n = self . length) -> Enumerator (6218.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に......//emlist[例][ruby]{
a = [1, 2, 3]
a.permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.per......e permutation of length 0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e... -
OpenSSL
:: BN # coerce(other) -> Array (6212.0) -
自身と other が同じクラスになるよう、自身か other を変換し [other, self] という配列にして返します。
...自身と other が同じクラスになるよう、自身か other を変換し
[other, self] という配列にして返します。
基本的に other が整数のときに、自身を Integer のオブジェクトに
変換して [other, 変換後オブジェクト] にして返します。
そ......例外 TypeError を発生させます。
//emlist[][ruby]{
require 'openssl'
p 1.to_bn.coerce(2) # => [2, 1]
//}
@param other 変換の基準となるオブジェクト
@raise TypeError 変換に失敗した場合に発生します
coerce メソッドの詳細な説明は、Numeric#coerce に......あります。
@see Numeric#coerce...