5370件ヒット
[1-100件を表示]
(0.077秒)
別のキーワード
クラス
-
ARGF
. class (91) - Array (583)
- BasicObject (33)
- Bignum (9)
- Binding (17)
- Complex (71)
- Data (10)
- Dir (73)
- Enumerator (55)
-
Enumerator
:: Chain (6) -
Enumerator
:: Lazy (11) - Exception (44)
- Fiber (26)
- File (22)
-
File
:: Stat (11) - Fixnum (9)
- Float (29)
- FrozenError (5)
- Hash (415)
- IO (289)
- Integer (120)
- MatchData (55)
- Method (75)
- Module (314)
- NameError (18)
- Numeric (203)
- Object (177)
- Proc (56)
-
Process
:: Status (33) - Range (75)
- Rational (19)
- Refinement (3)
- Regexp (11)
-
RubyVM
:: AbstractSyntaxTree :: Node (42) -
RubyVM
:: InstructionSequence (44) - SignalException (22)
- String (1132)
- Struct (77)
- Symbol (120)
- SystemCallError (11)
- Thread (66)
-
Thread
:: Backtrace :: Location (22) - ThreadGroup (33)
- Time (172)
- TracePoint (88)
- UnboundMethod (43)
- UncaughtThrowError (10)
モジュール
- Comparable (24)
- Enumerable (252)
- ObjectSpace (33)
- Process (11)
キーワード
- != (11)
- !~ (11)
- % (34)
- & (11)
- * (11)
- ** (11)
- + (22)
- < (11)
- << (34)
- <=> (60)
- == (35)
- === (33)
- =~ (22)
- >> (23)
- Comparable (11)
- Numeric (11)
- UnboundMethod (11)
- [] (98)
- []= (77)
-
_ dump (11) - abs (11)
- abs2 (11)
-
absolute
_ path (22) - add (11)
- append (7)
-
append
_ features (11) - autoload (11)
- between? (11)
- bind (11)
- byterindex (2)
- bytesplice (4)
- capitalize (11)
- capitalize! (11)
- casecmp (11)
- casecmp? (8)
- cause (11)
- center (11)
- children (12)
- chomp (11)
- chomp! (11)
- chop! (11)
- chr (33)
-
chunk
_ while (11) - clamp (13)
- class (11)
-
class
_ eval (22) -
class
_ exec (11) - clear (44)
-
clock
_ gettime (11) - clone (11)
- codepoints (50)
- coerce (11)
- collect! (22)
- compact (22)
- compact! (19)
-
compare
_ by _ identity (11) - concat (38)
- count (11)
- cover? (12)
- crypt (11)
- curry (20)
- dedup (2)
- default (22)
-
define
_ finalizer (22) -
defined
_ class (11) - delete (11)
- delete! (11)
-
delete
_ if (44) -
delete
_ prefix! (7) -
deprecate
_ constant (9) - disable (22)
- display (11)
- div (11)
- downcase (8)
- downcase! (11)
- dup (22)
- each (176)
-
each
_ byte (44) -
each
_ char (22) -
each
_ child (12) -
each
_ codepoint (66) -
each
_ cons (6) -
each
_ grapheme _ cluster (14) -
each
_ key (44) -
each
_ line (88) -
each
_ pair (66) -
each
_ slice (6) -
each
_ value (22) -
each
_ with _ index (22) - enable (22)
- enabled? (11)
- enclose (11)
- encode (33)
- encode! (22)
- entries (6)
-
enum
_ for (22) - eql? (13)
- equal? (22)
- eval (11)
- exception (22)
- exit (11)
- extend (11)
- extended (11)
- fdiv (28)
- fill (66)
-
first
_ column (6) -
first
_ lineno (17) - flatten (11)
- flatten! (11)
-
force
_ encoding (11) - freeze (11)
- friday? (11)
- gmt? (11)
- gmtime (11)
-
grapheme
_ clusters (14) - gsub! (44)
- hash (33)
- hex (11)
- i (11)
-
import
_ methods (3) - include (11)
- include? (11)
- included (11)
-
initialize
_ copy (11) - inject (33)
- insert (22)
- inspect (130)
-
instance
_ eval (22) -
keep
_ if (66) - kill (11)
-
last
_ column (6) -
last
_ lineno (6) - lazy (11)
- length (11)
- lines (16)
- list (11)
- ljust (11)
-
local
_ variables (9) - localtime (22)
- lstrip! (11)
- magnitude (11)
- main (11)
- map! (22)
- match (33)
- match? (16)
-
max
_ by (44) - merge (22)
- merge! (22)
-
module
_ eval (22) -
module
_ exec (11) -
module
_ function (7) - modulo (11)
- monday? (11)
- next (11)
- next! (11)
-
next
_ float (10) - nonzero? (11)
- offset (22)
- ord (11)
- partition (11)
- path (33)
-
pending
_ interrupt? (11) - permutation (22)
- polar (11)
- pos= (11)
- positive? (26)
- pow (22)
- pred (11)
- prepend (18)
-
prepend
_ features (11) - prepended (11)
-
prev
_ float (10) - printf (11)
- private (14)
-
private
_ class _ method (15) -
private
_ constant (11) - product (22)
- protected (7)
- public (30)
-
public
_ class _ method (15) -
public
_ constant (11) -
public
_ instance _ method (11) - push (11)
- putc (11)
- puts (11)
- quo (11)
- raise (15)
- rationalize (11)
- receiver (14)
- reduce (33)
- rehash (11)
- reject (22)
- reject! (44)
- remainder (11)
- reopen (33)
-
repeated
_ combination (22) -
repeated
_ permutation (22) - replace (44)
- resume (11)
- reverse (11)
- reverse! (22)
-
reverse
_ each (22) - rewind (11)
- rindex (11)
- rjust (11)
- round (11)
- rpartition (11)
- rstrip! (11)
- sample (44)
- saturday? (11)
- scan (22)
- scrub (11)
- scrub! (11)
- seek (11)
- select! (20)
-
set
_ encoding (44) - shift (11)
- signm (11)
- signo (11)
-
singleton
_ methods (11) - size (11)
- skip (11)
- slice (77)
-
slice
_ when (11) - sort (22)
- sort! (22)
-
sort
_ by (22) -
source
_ location (6) - split (12)
- squeeze! (11)
-
start
_ with? (12) - step (112)
- strip! (11)
- sub! (33)
- succ (18)
- succ! (11)
- sum (11)
- sunday? (11)
-
super
_ method (20) - swapcase (11)
- swapcase! (11)
- taint (6)
- tally (6)
- tap (11)
- terminate (11)
- thursday? (11)
-
to
_ a (6) -
to
_ c (22) -
to
_ enum (22) -
to
_ h (17) -
to
_ hash (11) -
to
_ path (11) -
to
_ proc (42) -
to
_ s (73) -
to
_ str (11) - tr! (11)
-
tr
_ s! (11) - tuesday? (11)
- type (6)
-
undefine
_ finalizer (11) - undump (7)
- uniq (22)
- uniq! (22)
- unshift (11)
- untaint (6)
- upcase (11)
- upcase! (11)
- update (44)
- upto (33)
- utc (11)
- utc? (11)
- value (11)
- wakeup (11)
- wednesday? (11)
- with (2)
- zip (44)
- ~ (11)
検索結果
先頭5件
-
TracePoint
# self -> object (21115.0) -
イベントを発生させたオブジェクトを返します。
...イベントを発生させたオブジェクトを返します。
以下のようにする事で同じ値を取得できます。
//emlist[例][ruby]{
trace.binding.eval('self')
//}
@see TracePoint#binding......返します。
以下のようにする事で同じ値を取得できます。
なお、self メソッドは binding が nil になる :c_call および :c_return イベントに対しても正しく動作します。
//emlist[例][ruby]{
trace.binding.eval('self')
//}
@see TracePoint#binding... -
Array
# repeated _ permutation(n) { |p| . . . } -> self (12310.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙......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 perm......ロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}
@see Array#repeated_combination, Array#permutation... -
Array
# repeated _ permutation(n) -> Enumerator (12210.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙......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 perm......ロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}
@see Array#repeated_combination, Array#permutation... -
Proc
# to _ proc -> self (9225.0) -
self を返します。
...
self を返します。
//emlist[例][ruby]{
pr = proc {}
p pr == pr.to_proc # => true
//}... -
Exception
# exception -> self (9219.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...しない場合は self を返します。引数を指定した場合 自身のコピー
を生成し Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_messag......e エラーメッセージを表す文字列を指定します。
//emlist[例][ruby]{
begin
# ... # 何か処理
rescue => e
raise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end
//}... -
Exception
# exception(error _ message) -> Exception (9219.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...しない場合は self を返します。引数を指定した場合 自身のコピー
を生成し Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_messag......e エラーメッセージを表す文字列を指定します。
//emlist[例][ruby]{
begin
# ... # 何か処理
rescue => e
raise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end
//}... -
String
# delete _ prefix!(prefix) -> self | nil (6325.0) -
self の先頭から破壊的に prefix を削除します。
...self の先頭から破壊的に prefix を削除します。
@param prefix 先頭から削除する文字列を指定します。
@return 削除した場合は self、変化しなかった場合は nil
//emlist[][ruby]{
"hello".delete_prefix!("hel") # => "lo"
"hello".delete_prefix!("llo") # => n......il
//}
@see String#delete_prefix
@see String#delete_suffix!
@see String#start_with?... -
String
# codepoints {|codepoint| block } -> self (6319.0) -
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
...self.each_codepoint.to_a と同じです)
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}
ブロックが指定された場合は String#each_codepoint と同じように動作します。
Ruby 2.6 までは dep......recated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_codepoint... -
String
# grapheme _ clusters {|grapheme _ cluster| block } -> self (6319.0) -
文字列の書記素クラスタの配列を返します。(self.each_grapheme_cluster.to_a と同じです)
...配列を返します。(self.each_grapheme_cluster.to_a と同じです)
//emlist[例][ruby]{
"a\u0300".grapheme_clusters # => ["à"]
//}
ブロックが指定された場合は String#each_grapheme_cluster と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ます......が、Ruby 2.7 で警告は削除されました。
@see String#each_grapheme_cluster... -
Array
# permutation(n = self . length) { |p| block } -> self (6312.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙......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.permutation(0).to_a #=> [[]]: one per......mutation 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| res...