別のキーワード
クラス
-
ARGF
. class (123) - Array (1344)
- BasicObject (48)
- Binding (31)
- Class (12)
- Complex (444)
- Data (21)
- Dir (141)
- Encoding (36)
-
Encoding
:: Converter (156) -
Encoding
:: InvalidByteSequenceError (24) - Enumerator (132)
-
Enumerator
:: Lazy (189) -
Enumerator
:: Yielder (30) - Exception (128)
- FalseClass (60)
- Fiber (38)
- File (60)
-
File
:: Stat (372) - Float (113)
- FrozenError (6)
- Hash (800)
- IO (412)
- Integer (204)
- MatchData (240)
- Method (143)
- Module (672)
- Mutex (2)
- NilClass (31)
- Numeric (283)
- Object (603)
-
ObjectSpace
:: WeakMap (12) - Proc (188)
- Random (60)
- Range (199)
- Rational (81)
- Refinement (4)
- Regexp (201)
-
RubyVM
:: AbstractSyntaxTree :: Node (49) -
RubyVM
:: InstructionSequence (48) - Set (132)
- SignalException (24)
- String (1680)
- Struct (120)
- Symbol (65)
- Thread (146)
-
Thread
:: Backtrace :: Location (36) -
Thread
:: Mutex (10) -
Thread
:: Queue (40) -
Thread
:: SizedQueue (30) - ThreadGroup (24)
- Time (649)
- TracePoint (201)
- TrueClass (48)
- UnboundMethod (84)
- UncaughtThrowError (33)
モジュール
- Comparable (87)
- Enumerable (734)
- GC (12)
キーワード
- != (12)
- !~ (12)
- % (38)
- & (27)
- * (48)
- ** (24)
- + (51)
- - (39)
- -@ (12)
-
/ (12) - < (24)
- << (65)
- <= (12)
- <=> (66)
- == (138)
- === (63)
- =~ (40)
- > (12)
- >= (12)
- >> (26)
- [] (192)
- []= (144)
- ^ (27)
-
_ dump (12) -
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) - abs (12)
- abs2 (12)
-
absolute
_ path (24) - add (15)
- add? (3)
-
add
_ trace _ func (12) - advise (12)
- alive? (4)
- all? (53)
- ancestors (12)
- angle (24)
- any? (62)
- append (8)
-
append
_ as _ bytes (1) -
append
_ features (12) - arg (24)
- arity (36)
-
ascii
_ compatible? (12) - asctime (12)
- assoc (12)
- atime (12)
- autoload (12)
- backtrace (12)
-
backtrace
_ locations (12) - begin (24)
- between? (12)
- bind (12)
- binding (24)
- blksize (12)
- blocks (12)
- bytebegin (2)
- byteend (2)
- byteindex (3)
- byteoffset (6)
- byterindex (3)
- bytes (12)
- bytesize (12)
- call (12)
-
callee
_ id (12) - capitalize (12)
- capitalize! (12)
- captures (12)
- casecmp (24)
- casecmp? (18)
- casefold? (12)
- cause (12)
- ceil (12)
- center (12)
- children (14)
- chomp (12)
- chomp! (12)
- chop (12)
- chop! (12)
- chown (12)
- chr (36)
- chunk (12)
-
chunk
_ while (12) - clamp (15)
- class (12)
-
class
_ eval (24) -
class
_ exec (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) - classify (3)
- clear (39)
- clone (39)
- codepoints (24)
- coerce (12)
- collect (48)
- collect! (27)
- compact (25)
- compact! (21)
-
compare
_ by _ identity (12) -
compare
_ by _ identity? (12) - concat (42)
- conj (12)
- conjugate (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) - constants (12)
- convpath (12)
- count (12)
- cover? (14)
- crypt (12)
- ctime (24)
- curry (46)
- day (12)
- deconstruct (2)
- dedup (3)
- default (24)
- default= (12)
-
default
_ proc (12) -
default
_ proc= (12) -
define
_ method (24) -
defined
_ class (12) - delete (63)
- delete! (12)
- delete? (3)
-
delete
_ at (12) -
delete
_ if (51) -
delete
_ prefix (8) -
delete
_ prefix! (8) - denominator (12)
-
deprecate
_ constant (12) - deq (20)
- detect (24)
- dev (12)
-
dev
_ major (12) -
dev
_ minor (12) - difference (3)
- directory? (12)
- disable (24)
- disjoint? (3)
- display (12)
- div (12)
- divide (6)
- downcase (12)
- downcase! (12)
- drop (36)
-
drop
_ while (60) - dst? (12)
- dump (12)
- dup (51)
- each (171)
-
each
_ byte (48) -
each
_ char (24) -
each
_ child (14) -
each
_ codepoint (72) -
each
_ cons (24) -
each
_ grapheme _ cluster (16) -
each
_ key (24) -
each
_ line (96) -
each
_ pair (48) -
each
_ slice (24) -
each
_ value (24) -
each
_ with _ index (24) - eager (6)
- empty? (49)
- enable (24)
- encode (36)
- encode! (24)
- end (12)
- entries (7)
-
enum
_ for (48) - eql? (111)
- equal? (24)
-
error
_ bytes (12) - eval (12)
-
eval
_ script (7) - event (12)
- except (4)
- exception (24)
- executable? (12)
-
executable
_ real? (12) - extend (12)
- extended (12)
-
external
_ encoding (12) - fdiv (24)
- feed (12)
- fetch (72)
- file? (12)
- fill (72)
-
filter
_ map (18) - find (24)
-
find
_ index (36) - finish (12)
- finite? (9)
- first (48)
-
first
_ column (7) -
first
_ lineno (19) -
fixed
_ encoding? (12) -
flat
_ map (36) - flatten (15)
- flatten! (15)
- flock (12)
- floor (12)
-
force
_ encoding (12) - freeze (12)
- friday? (12)
- frozen? (12)
- ftype (12)
-
garbage
_ collect (12) - getgm (12)
- getlocal (24)
- gets (27)
- getutc (12)
- gid (12)
- gmt? (12)
-
gmt
_ offset (12) - gmtime (12)
- gmtoff (12)
-
grapheme
_ clusters (16) - grep (36)
-
grep
_ v (34) -
group
_ by (24) - grpowned? (12)
- gsub (48)
- gsub! (48)
-
has
_ key? (12) -
has
_ value? (12) - hash (87)
- hex (12)
- hour (12)
- i (12)
- imag (12)
- imaginary (12)
-
import
_ methods (4) - include (12)
- include? (39)
- included (12)
-
incomplete
_ input? (12) - index (55)
- infinite? (21)
- initialize (12)
-
initialize
_ copy (12) - inject (36)
- ino (12)
-
inplace
_ mode (12) -
inplace
_ mode= (12) - insert (24)
-
insert
_ output (12) - inspect (319)
-
instance
_ eval (24) -
instance
_ methods (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) -
instruction
_ sequence (7) - intern (12)
-
internal
_ encoding (12) - intersection (3)
- invert (12)
-
is
_ a? (12) - isdst (12)
- join (12)
-
keep
_ if (48) - key (12)
- key? (12)
- keys (12)
-
kind
_ of? (12) - lambda? (12)
- last (24)
-
last
_ column (7) -
last
_ error (12) -
last
_ lineno (7) - lazy (24)
- length (27)
- lineno (12)
- lines (18)
- list (12)
- ljust (12)
-
local
_ variable _ set (12) - localtime (24)
- lstat (12)
- lstrip (12)
- lstrip! (12)
- magnitude (12)
- map (60)
- map! (27)
-
marshal
_ dump (24) -
marshal
_ load (12) - match (48)
- match? (27)
-
max
_ by (48) - mday (12)
- member? (27)
- members (15)
- merge (27)
- merge! (24)
- method (12)
-
method
_ id (12) -
method
_ missing (12) - methods (12)
- min (12)
-
module
_ eval (24) -
module
_ exec (12) -
module
_ function (36) - modulo (12)
- mon (12)
- monday? (12)
- month (12)
- mtime (12)
- name (17)
-
named
_ captures (24) - names (12)
- nan? (12)
- next (12)
- next! (12)
-
next
_ float (11) -
next
_ values (12) - nlink (12)
- none? (15)
- nonzero? (12)
- nsec (12)
- numerator (12)
-
object
_ id (12) - oct (12)
- offset (24)
- one? (15)
- ord (12)
- overlap? (2)
- pack (21)
- parameters (31)
- partition (36)
- path (75)
- peek (12)
-
peek
_ values (12) - permutation (24)
- phase (36)
- pid (12)
- pipe? (12)
- polar (24)
- pop (44)
- pos (24)
- pos= (24)
- positive? (29)
-
post
_ match (12) - pow (24)
-
pre
_ match (12) - pread (8)
- pred (12)
- prepend (41)
-
prepend
_ features (12) - prepended (12)
-
prev
_ float (11) -
primitive
_ convert (48) -
primitive
_ errinfo (12) - print (12)
- priority (12)
- priority= (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) - product (24)
-
proper
_ subset? (3) -
proper
_ superset? (3) -
protected
_ method _ defined? (12) - public (48)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ instance _ method (12) -
public
_ method (12) -
public
_ method _ defined? (12) -
public
_ send (24) - push (12)
- putback (24)
- putc (12)
- pwrite (8)
- quo (24)
- raise (18)
-
raised
_ exception (12) - rassoc (12)
- rationalize (72)
- rdev (12)
-
rdev
_ major (12) -
rdev
_ minor (12) - read (12)
- readable? (12)
-
readable
_ real? (12) - readlines (36)
- real (12)
- real? (12)
- receiver (6)
- rect (12)
- rectangular (12)
- reduce (36)
- regexp (12)
- rehash (12)
- reject (24)
- reject! (51)
- remainder (12)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) - reopen (36)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - replace (39)
- replacement (12)
- replacement= (12)
- replicate (12)
-
report
_ on _ exception (9) -
report
_ on _ exception= (9) -
respond
_ to? (12) -
respond
_ to _ missing? (12) - resume (12)
-
return
_ value (12) - reverse (24)
- reverse! (24)
-
reverse
_ each (28) - rewind (12)
- rindex (48)
- rjust (12)
- round (45)
- rpartition (12)
- rstrip (12)
- rstrip! (12)
-
ruby2
_ keywords (6) - sample (48)
- saturday? (12)
- scan (24)
- scrub (12)
- scrub! (12)
- sec (12)
- seed (12)
- seek (12)
- select! (10)
- self (12)
- send (24)
-
set
_ backtrace (12) -
set
_ encoding _ by _ bom (6) -
set
_ trace _ func (12) - shift (56)
- signm (12)
- signo (12)
-
singleton
_ methods (12) - size (51)
- size? (12)
- skip (12)
- sleep (12)
- slice (108)
- slice! (24)
-
slice
_ after (35) -
slice
_ before (36) -
slice
_ when (12) - sort (24)
- sort! (24)
-
sort
_ by (24) - source (12)
-
source
_ location (19) - split (19)
- squeeze (12)
- squeeze! (12)
-
start
_ with? (14) - step (124)
- stop? (12)
- store (12)
- strftime (12)
- strip (12)
- strip! (12)
- sub (36)
- sub! (36)
- subsec (12)
- subset? (3)
- subtract (3)
- succ (19)
- succ! (12)
- sum (21)
- sunday? (12)
-
super
_ method (11) - superclass (12)
- superset? (3)
- swapcase (12)
- swapcase! (12)
- symlink? (12)
- tag (11)
- taint (6)
- tainted? (6)
- tally (8)
- tap (12)
- tell (24)
- thursday? (12)
-
to
_ a (58) -
to
_ ary (12) -
to
_ c (48) -
to
_ enum (48) -
to
_ f (36) -
to
_ h (19) -
to
_ hash (24) -
to
_ i (36) -
to
_ int (12) -
to
_ path (27) -
to
_ proc (64) -
to
_ r (24) -
to
_ regexp (12) -
to
_ s (217) -
to
_ set (6) -
to
_ str (24) -
to
_ sym (12) - tr (12)
-
tr
_ s (12) -
tr
_ s! (12) - transfer (4)
- transpose (12)
- truncate (12)
- tuesday? (12)
-
tv
_ nsec (12) -
tv
_ sec (12) -
tv
_ usec (12) - type (7)
- uid (12)
- undump (8)
- union (3)
- uniq (24)
- uniq! (24)
- unpack (12)
- unpack1 (9)
- unshift (12)
- untaint (6)
- upcase (12)
- upcase! (12)
- update (24)
- upto (36)
- usec (12)
- utc (12)
- utc? (12)
-
utc
_ offset (12) - value (11)
- value? (12)
- values (12)
-
values
_ at (48) - wakeup (12)
- wday (12)
- wednesday? (12)
- with (3)
-
with
_ index (24) - writable? (12)
-
writable
_ real? (12) - yday (12)
- year (12)
- yield (24)
- zero? (24)
- zip (72)
- zone (12)
- | (27)
- ~ (12)
検索結果
先頭5件
-
Array
# repeated _ permutation(n) -> Enumerator (12216.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...オブジェクトを返します。
@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... -
Array
# repeated _ permutation(n) { |p| . . . } -> self (12216.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...オブジェクトを返します。
@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... -
Proc
# ruby2 _ keywords -> proc (9234.0) -
Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.
...e proc as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked with a sp......f a normal argument splat to another method call, and that
method call does not include explicit keywords or a keyword splat, the
final element is interpreted as keywords. In other words, keywords will
be passed through the proc to other methods.
This should only be used for procs that delegate ke......another
method, and only for backwards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the proc responds to this method before calling
it. Als... -
Exception
# exception(error _ message) -> Exception (9209.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...成し Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_message エラーメッセージを表す文字列を指定します。
//emlist[例][ruby]{
begin......# ... # 何か処理
rescue => e
raise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end
//}... -
Proc
# to _ proc -> self (9115.0) -
self を返します。
...self を返します。
//emlist[例][ruby]{
pr = proc {}
p pr == pr.to_proc # => true
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # type -> Symbol (9115.0) -
self の種類を Symbol で返します。
...self の種類を Symbol で返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.type # => :SCOPE
//}... -
Exception
# exception -> self (9109.0) -
引数を指定しない場合は self を返します。引数を指定した場合 自身のコピー を生成し Exception#message 属性を error_message にして返します。
...成し Exception#message 属性を error_message にして返します。
Kernel.#raise は、実質的に、例外オブジェクトの exception
メソッドの呼び出しです。
@param error_message エラーメッセージを表す文字列を指定します。
//emlist[例][ruby]{
begin......# ... # 何か処理
rescue => e
raise e.exception("an error occurs during hogehoge process") # 詳しいエラーメッセージ
end
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (9109.0) -
self のデバッグ用の情報を含んだ文字列を返します。
...self のデバッグ用の情報を含んだ文字列を返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//}... -
RubyVM
:: InstructionSequence # inspect -> String (9109.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (9103.0) -
self が表す命令シーケンスの絶対パスを返します。
...= RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = Ruby......VM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path...