4645件ヒット
[1-100件を表示]
(0.110秒)
別のキーワード
クラス
-
ARGF
. class (36) - Array (421)
- Binding (7)
- Complex (72)
- Data (15)
- Dir (43)
- Encoding (24)
-
Encoding
:: Converter (72) - Enumerator (91)
-
Enumerator
:: Lazy (272) -
Enumerator
:: Yielder (30) - Exception (12)
- File (72)
-
File
:: Stat (504) - Float (245)
- Hash (153)
- IO (174)
- Integer (132)
- MatchData (241)
- Method (12)
- Module (196)
- NilClass (48)
- Numeric (176)
- Object (68)
- Proc (12)
- Random (24)
- Range (38)
- Rational (309)
- Regexp (24)
-
RubyVM
:: InstructionSequence (34) - Set (3)
- String (413)
- Struct (31)
- Thread (45)
-
Thread
:: Backtrace :: Location (84) - Time (72)
- TracePoint (12)
- UnboundMethod (12)
モジュール
- Enumerable (404)
- GC (12)
キーワード
- % (7)
- * (12)
- ** (12)
- + (19)
- - (24)
- -@ (9)
-
/ (12) - << (12)
- <=> (36)
- == (12)
- [] (96)
-
abort
_ on _ exception= (12) - abs (9)
-
absolute
_ path (24) - angle (12)
- arg (12)
-
ascii
_ compatible? (12) - atime (24)
- attr (24)
-
attr
_ accessor (8) -
attr
_ reader (8) -
attr
_ writer (12) - autoload (12)
-
backtrace
_ locations (36) -
base
_ label (12) - begin (12)
- birthtime (12)
- blksize (12)
- blockdev? (12)
- blocks (12)
- bsearch (24)
-
bsearch
_ index (10) - bytebegin (2)
- byteend (2)
- byteindex (3)
- byteoffset (6)
- byterindex (3)
- captures (12)
- ceil (28)
- chain (7)
- chardev? (12)
- chunk (12)
-
chunk
_ while (12) - coerce (12)
- collect (12)
- collect! (12)
-
collect
_ concat (36) - combination (24)
- concat (21)
- conjugate (24)
-
const
_ source _ location (12) - convpath (12)
- ctime (12)
- cycle (24)
- deconstruct (2)
-
deconstruct
_ keys (3) -
delete
_ at (12) -
delete
_ if (24) - denominator (48)
-
destination
_ encoding (12) - detect (12)
- dev (12)
-
dev
_ major (12) -
dev
_ minor (12) - directory? (12)
- divmod (12)
- downto (12)
-
drop
_ while (36) - each (60)
-
each
_ byte (24) -
each
_ char (24) -
each
_ child (7) -
each
_ codepoint (36) -
each
_ grapheme _ cluster (8) -
each
_ index (12) -
each
_ line (48) -
each
_ pair (24) -
each
_ slice (12) -
each
_ with _ index (12) -
each
_ with _ object (12) - end (12)
-
enum
_ for (24) - executable? (12)
-
executable
_ real? (12) - fdatasync (12)
- fdiv (24)
- feed (12)
-
fetch
_ values (2) - file? (12)
- filter (35)
- filter! (14)
-
filter
_ map (12) - find (12)
-
find
_ all (24) -
find
_ index (24) - finite? (12)
-
flat
_ map (36) - flatten (12)
- flatten! (15)
- flock (12)
- floor (29)
- ftype (12)
-
garbage
_ collect (12) - gid (12)
- grep (24)
-
grep
_ v (22) -
group
_ by (12) - grpowned? (12)
- gsub (48)
- gsub! (48)
- hash (15)
- index (31)
- infinite? (12)
- ino (12)
- inspect (51)
- isatty (12)
-
keep
_ if (24) - key (7)
- label (12)
- length (12)
- lineno (12)
- lstat (12)
- magnitude (21)
- map (12)
- map! (12)
- match (48)
- match? (9)
-
max
_ by (24) -
min
_ by (24) -
minmax
_ by (12) - mode (12)
- mtime (12)
-
named
_ captures (1) - names (12)
- negative? (29)
- nlink (12)
- numerator (48)
- offset (24)
- owned? (12)
- pack (21)
- partition (12)
- path (75)
- permutation (24)
- phase (12)
- pipe? (12)
- positive? (19)
-
post
_ match (12) -
pre
_ match (12) -
primitive
_ convert (48) - private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) - quo (24)
- rand (24)
- rationalize (108)
- rdev (12)
-
rdev
_ major (12) -
rdev
_ minor (12) - readable? (12)
-
readable
_ real? (12) - reject (48)
- reject! (24)
- reopen (24)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - replicate (12)
-
report
_ on _ exception= (9) -
respond
_ to _ missing? (12) - rewind (12)
- rindex (24)
- round (37)
-
ruby2
_ keywords (12) - saturday? (12)
- scan (24)
- select (50)
- select! (19)
- setgid? (12)
- setuid? (12)
- size (48)
- size? (12)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) - socket? (12)
-
sort
_ by (12) -
source
_ location (43) - stat (12)
- step (88)
- sticky? (12)
- strftime (12)
- string (12)
- sub (36)
- sub! (36)
- subsec (12)
- symlink? (12)
-
take
_ while (48) - times (12)
-
to
_ a (12) -
to
_ binary (10) -
to
_ enum (24) -
to
_ f (60) -
to
_ i (24) -
to
_ path (27) -
to
_ proc (6) -
to
_ r (84) -
to
_ s (51) - tr (12)
-
tr
_ s (12) -
tr
_ s! (12) -
transform
_ keys (8) -
transform
_ keys! (8) -
transform
_ values (9) -
transform
_ values! (9) - truncate (60)
- tty? (12)
- uid (12)
- unpack (12)
- unpack1 (9)
- upto (12)
-
values
_ at (12) - with (3)
-
with
_ index (36) -
with
_ object (24) -
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - yield (12)
-
yield
_ self (8) - zero? (12)
- zip (24)
検索結果
先頭5件
-
Encoding
:: Converter # destination _ encoding -> Encoding (21409.0) -
変換先のエンコーディングを返します。
...変換先のエンコーディングを返します。
@return 変換先のエンコーディング
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "euc-jp")
ec.destination_encoding #=> #<Encoding:EUC-JP>
//}... -
Array
# repeated _ combination(n) -> Enumerator (18415.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...生成する Enumerator オブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引......指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.repeated_combination(1).to_a #=> [[1], [2], [3]]
a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],......,3]]
a.repeated_combination(4).to_a #=> [[1,1,1,1],[1,1,1,2],[1,1,1,3],[1,1,2,2],[1,1,2,3],
# [1,1,3,3],[1,2,2,2],[1,2,2,3],[1,2,3,3],[1,3,3,3],
# [2,2,2,2],[2,2,2,3],[2,2,3,3],[2,3,3,3],[3,3,3,3]]
a.repeated_combination(0).to_a... -
Array
# repeated _ permutation(n) -> Enumerator (18415.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...生成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数......mlist[例][ruby]{
a = [1, 2]
a.repeated_permutation(1).to_a #=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation......(0).to_a #=> [[]] # one permutation of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result... -
Rational
# rationalize(eps = 0) -> Rational (18409.0) -
自身から eps で指定した許容誤差の範囲に収まるような Rational を返 します。
...うな Rational を返
します。
eps を省略した場合は self を返します。
@param eps 許容する誤差
//emlist[例][ruby]{
r = Rational(5033165, 16777216)
r.rationalize # => (5033165/16777216)
r.rationalize(Rational(0.01)) # => (3/10)
r.rationalize(Rational(0.... -
Array
# repeated _ combination(n) { |c| . . . } -> self (18315.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...生成する Enumerator オブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引......指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.repeated_combination(1).to_a #=> [[1], [2], [3]]
a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],......,3]]
a.repeated_combination(4).to_a #=> [[1,1,1,1],[1,1,1,2],[1,1,1,3],[1,1,2,2],[1,1,2,3],
# [1,1,3,3],[1,2,2,2],[1,2,2,3],[1,2,3,3],[1,3,3,3],
# [2,2,2,2],[2,2,2,3],[2,2,3,3],[2,3,3,3],[3,3,3,3]]
a.repeated_combination(0).to_a... -
Array
# repeated _ permutation(n) { |p| . . . } -> self (18315.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...生成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数......mlist[例][ruby]{
a = [1, 2]
a.repeated_permutation(1).to_a #=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation......(0).to_a #=> [[]] # one permutation of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (15409.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...tion#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date......aise "#{month} is not long month"
end
def get_exception
return begin
yield
rescue => e
e
end
end
e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:in `get_exception'", "test.rb:15:i......n `<main>'"]
//}
@see Exception#backtrace... -
Float
# rationalize -> Rational (15409.0) -
自身から eps で指定した許容誤差の範囲に収まるような Rational を返 します。
...るような Rational を返
します。
eps を省略した場合は誤差が最も小さくなるような Rational を返しま
す。
@param eps 許容する誤差
//emlist[例][ruby]{
0.3.rationalize # => (3/10)
1.333.rationalize # => (1333/1000)
1.333.rationalize(0.01) # =... -
Float
# rationalize(eps) -> Rational (15409.0) -
自身から eps で指定した許容誤差の範囲に収まるような Rational を返 します。
...るような Rational を返
します。
eps を省略した場合は誤差が最も小さくなるような Rational を返しま
す。
@param eps 許容する誤差
//emlist[例][ruby]{
0.3.rationalize # => (3/10)
1.333.rationalize # => (1333/1000)
1.333.rationalize(0.01) # =...