別のキーワード
ライブラリ
- ビルトイン (11998)
クラス
-
ARGF
. class (218) - Array (1105)
- BasicObject (168)
- Bignum (99)
- Binding (86)
- Class (40)
- Complex (129)
- Data (15)
- Dir (36)
- Encoding (24)
-
Encoding
:: Converter (120) -
Encoding
:: InvalidByteSequenceError (84) - Enumerator (132)
-
Enumerator
:: ArithmeticSequence (21) -
Enumerator
:: Chain (14) -
Enumerator
:: Lazy (187) -
Enumerator
:: Yielder (24) - Exception (56)
- FalseClass (24)
- Fiber (38)
- File (11)
-
File
:: Stat (276) - Fixnum (84)
- Float (152)
- FrozenError (6)
- Hash (837)
- IO (376)
- Integer (273)
- KeyError (16)
- LocalJumpError (24)
- MatchData (90)
- Method (200)
- Module (724)
- Mutex (8)
- NameError (32)
- NilClass (36)
- NoMethodError (21)
- Numeric (187)
- Object (861)
-
ObjectSpace
:: WeakMap (24) - Proc (80)
-
Process
:: Status (72) - Random (24)
- Range (307)
- Rational (48)
- Regexp (93)
-
RubyVM
:: AbstractSyntaxTree :: Node (49) -
RubyVM
:: InstructionSequence (130) - Set (36)
- StopIteration (12)
- String (1025)
- Struct (181)
- Symbol (407)
- SystemExit (12)
- Thread (306)
-
Thread
:: Backtrace :: Location (84) -
Thread
:: ConditionVariable (30) -
Thread
:: Mutex (40) -
Thread
:: Queue (50) -
Thread
:: SizedQueue (68) - ThreadGroup (12)
- Time (168)
- TracePoint (146)
- TrueClass (36)
- UnboundMethod (179)
- UncaughtThrowError (22)
モジュール
- Comparable (87)
- Enumerable (1424)
- GC (12)
キーワード
- ! (12)
- != (12)
- !~ (12)
- % (18)
- & (18)
- * (6)
- ** (17)
- + (30)
- - (6)
- -@ (3)
-
/ (6) - < (73)
- << (78)
- <= (73)
- <=> (27)
- == (259)
- === (98)
- =~ (21)
- > (73)
- >= (73)
- >> (32)
- [] (255)
- []= (72)
- ^ (42)
-
_ _ id _ _ (12) -
_ _ send _ _ (24) -
_ dump (12) -
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) - abs (63)
- abs2 (24)
-
absolute
_ path (24) -
add
_ trace _ func (12) -
alias
_ method (4) - alive? (16)
- all? (53)
- allbits? (8)
- allocate (12)
- any? (62)
- anybits? (8)
- append (8)
- args (12)
- arity (24)
-
ascii
_ compatible? (12) -
ascii
_ only? (12) - assoc (12)
- at (12)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) - autoclose= (12)
- autoclose? (12)
- backtrace (24)
-
backtrace
_ locations (36) -
base
_ label (24) - begin (31)
- between? (24)
- bind (12)
-
bind
_ call (12) - binding (24)
- binmode (24)
- binmode? (24)
- birthtime (23)
-
bit
_ length (18) - blksize (12)
- blockdev? (12)
- blocks (12)
- broadcast (10)
- bsearch (48)
-
bsearch
_ index (20) - byteindex (3)
- byteoffset (6)
- byterindex (3)
- bytes (64)
- bytesize (12)
- byteslice (36)
- bytesplice (10)
- call (24)
-
callee
_ id (12) - capitalize (12)
- casecmp (12)
- casecmp? (18)
- casefold? (12)
- chain (7)
- chardev? (12)
- chars (12)
- children (7)
- chunk (12)
-
chunk
_ while (21) - clamp (27)
- class (12)
-
class
_ eval (24) -
class
_ exec (12) -
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
class
_ variables (12) - clone (24)
-
close
_ on _ exec= (12) -
close
_ on _ exec? (12) - closed? (34)
- codepoints (12)
- collect (36)
-
collect
_ concat (36) - combination (24)
- compact (13)
- compact! (9)
-
compare
_ by _ identity (12) -
compare
_ by _ identity? (12) - concat (18)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ set (12) -
const
_ source _ location (12) - constants (12)
- convert (12)
- coredump? (12)
- count (48)
- cover? (19)
- curry (46)
- cycle (48)
- deconstruct (9)
- default (24)
-
define
_ method (24) -
define
_ singleton _ method (24) - delete (48)
-
delete
_ at (12) - deq (20)
-
destination
_ encoding (12) -
destination
_ encoding _ name (12) - detect (24)
- dig (30)
- digits (12)
- directory? (12)
- disable (24)
- disasm (12)
- disassemble (12)
- disjoint? (3)
- display (12)
- div (6)
- divmod (3)
- downcase (12)
- drop (12)
-
drop
_ while (24) - dst? (12)
- dummy? (12)
- dump (12)
- dup (12)
- each (79)
-
each
_ byte (72) -
each
_ char (12) -
each
_ codepoint (12) -
each
_ cons (24) -
each
_ entry (24) -
each
_ grapheme _ cluster (8) -
each
_ key (24) -
each
_ pair (36) -
each
_ slice (24) -
each
_ value (24) -
each
_ with _ index (24) -
each
_ with _ object (24) - empty? (69)
- enable (24)
- enabled? (12)
- enclosed? (12)
- encode (36)
- encoding (12)
- end (12)
-
end
_ with? (18) - enq (10)
- entries (19)
-
enum
_ for (36) - eof (24)
- eof? (24)
- eql? (162)
- equal? (48)
-
error
_ bytes (12) - eval (24)
- even? (18)
- event (12)
- except (4)
-
exclude
_ end? (19) - executable? (12)
-
executable
_ real? (12) -
exit
_ value (12) - exited? (12)
- extend (12)
-
extend
_ object (12) - extended (12)
- fdiv (3)
- feed (12)
- fetch (80)
-
fetch
_ values (20) - file? (12)
- filter (49)
- filter! (28)
-
filter
_ map (12) - find (24)
-
find
_ all (24) -
find
_ index (36) - finish (12)
- finite? (30)
- first (60)
-
first
_ column (7) -
first
_ lineno (19) -
fixed
_ encoding? (12) -
flat
_ map (36) - force (12)
- freeze (12)
- friday? (12)
- frozen? (12)
-
garbage
_ collect (12) - getbyte (36)
- getc (12)
- gmt? (12)
-
grapheme
_ clusters (8) - grep (24)
-
grep
_ v (24) -
group
_ by (24) - grpowned? (12)
- gsub (48)
- gsub! (48)
-
has
_ key? (12) -
has
_ value? (12) - hash (51)
- id2name (12)
-
ignore
_ deadlock (4) -
ignore
_ deadlock= (4) - include? (75)
-
incomplete
_ input? (12) - index (7)
- inherited (12)
- initialize (12)
-
initialize
_ clone (12) -
initialize
_ copy (12) -
initialize
_ dup (12) - inject (36)
- insert (12)
-
insert
_ output (12) - inspect (115)
-
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ method (12) -
instance
_ methods (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) -
instruction
_ sequence (7) - integer? (12)
- intern (24)
- intersect? (7)
- intersection (6)
- invert (12)
- irb (9)
-
is
_ a? (12) - isatty (12)
- isdst (12)
- itself (12)
-
keep
_ if (48) - key (20)
- key? (24)
- keys (24)
-
kind
_ of? (12) - label (24)
- lambda? (12)
- last (36)
-
last
_ column (7) -
last
_ lineno (7) - lazy (12)
- length (12)
- lineno (12)
- lineno= (24)
-
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) -
local
_ variables (21) - locked? (12)
- magnitude (63)
- map (36)
-
marshal
_ dump (12) -
marshal
_ load (12) - match (48)
- match? (27)
- max (130)
-
max
_ by (48) - member? (39)
- members (15)
- merge (24)
- merge! (24)
- method (12)
-
method
_ defined? (12) -
method
_ id (12) -
method
_ missing (12) - methods (12)
- min (130)
-
min
_ by (48) - minmax (48)
-
minmax
_ by (24) -
module
_ eval (24) -
module
_ exec (12) -
module
_ function (12) - modulo (6)
- monday? (12)
- name (53)
-
named
_ captures (12) - nan? (12)
- negative? (29)
- new (12)
- next (36)
- next! (12)
- nil? (24)
- nobits? (8)
- none? (53)
- nonzero? (12)
-
object
_ id (12) - oct (12)
- odd? (18)
- one? (53)
-
original
_ name (24) - overlap? (2)
- owned? (24)
- owner (12)
- pack (21)
- parameters (43)
- partition (24)
- path (24)
- peek (12)
-
pending
_ interrupt? (12) - permutation (12)
- pipe? (12)
- pop (32)
- pos= (12)
- positive? (29)
- pow (22)
- pread (8)
- prepend (20)
-
prepend
_ features (12) -
primitive
_ convert (48) - priority (12)
- priority= (12)
- private (48)
-
private
_ call? (9) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) -
private
_ methods (12) -
proper
_ subset? (3) -
proper
_ superset? (3) - protected (12)
-
protected
_ instance _ methods (12) -
protected
_ method _ defined? (12) -
protected
_ methods (12) - public (48)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ instance _ method (12) -
public
_ instance _ methods (12) -
public
_ method (12) -
public
_ method _ defined? (12) -
public
_ methods (12) -
public
_ send (24) - push (22)
- putback (24)
- putc (24)
- puts (12)
- raise (30)
- rassoc (12)
- read (12)
-
read
_ nonblock (24) - readable? (12)
-
readable
_ real? (12) -
readagain
_ bytes (12) - readbyte (24)
- readpartial (24)
- real? (12)
- reason (12)
- receiver (47)
- reduce (36)
- regexp (12)
- rehash (12)
- reject (36)
- remainder (3)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) -
repeated
_ combination (24) - replace (12)
- replacement= (12)
-
report
_ on _ exception (9) -
report
_ on _ exception= (9) -
respond
_ to? (12) -
respond
_ to _ missing? (12) - result (12)
- resume (12)
-
return
_ value (12) -
reverse
_ each (48) - rewind (19)
- rotate (12)
- rotate! (12)
-
ruby2
_ keywords (18) - sample (24)
- saturday? (12)
- scan (24)
- scrub (36)
- scrub! (36)
- seek (12)
- select (84)
- select! (48)
- self (12)
- send (24)
-
set
_ backtrace (12) -
set
_ encoding (72) -
set
_ encoding _ by _ bom (6) -
set
_ trace _ func (12) - setbyte (12)
- setgid? (12)
- setuid? (12)
- shift (44)
- signal (10)
- signaled? (12)
-
singleton
_ class (12) -
singleton
_ class? (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) - size (15)
- slice (152)
- slice! (48)
-
slice
_ after (35) -
slice
_ before (60) -
slice
_ when (23) - socket? (12)
- sort (48)
- sort! (24)
-
sort
_ by (24) -
sort
_ by! (24) -
source
_ encoding (12) -
source
_ encoding _ name (12) -
source
_ location (19) - split (19)
-
start
_ with? (18) - status (12)
- step (62)
- sticky? (12)
- stop? (12)
- stopped? (12)
- store (12)
- strftime (12)
- sub (36)
- sub! (36)
- subclasses (4)
- subsec (12)
- subset? (3)
- subtract (3)
- succ (27)
- succ! (12)
- success? (24)
- sum (54)
- sunday? (12)
-
super
_ method (11) - superset? (3)
- swapcase (12)
- sync (12)
- synchronize (12)
- sysread (12)
- tag (11)
- taint (9)
- tainted? (9)
- take (12)
-
take
_ while (48) - tally (10)
- tap (12)
- then (14)
-
thread
_ variable? (12) -
thread
_ variable _ get (12) -
thread
_ variable _ set (12) - thursday? (12)
-
to
_ a (55) -
to
_ ary (12) -
to
_ binary (10) -
to
_ enum (36) -
to
_ f (3) -
to
_ h (50) -
to
_ hash (12) -
to
_ i (12) -
to
_ int (12) -
to
_ io (12) -
to
_ proc (24) -
to
_ regexp (12) -
to
_ s (104) -
to
_ set (6) -
to
_ str (12) -
to
_ sym (24) - transfer (4)
-
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) - trust (9)
-
try
_ lock (12) - tty? (12)
- tuesday? (12)
- type (7)
- unbind (12)
-
undef
_ method (12) - ungetbyte (12)
-
unicode
_ normalized? (11) - union (7)
- uniq (24)
- unpack (12)
- unpack1 (9)
- unshift (12)
- untaint (9)
- untrust (9)
- untrusted? (9)
- upcase (12)
- update (24)
- upto (12)
- utc? (12)
-
valid
_ encoding? (12) - value (23)
- value? (12)
- values (24)
-
values
_ at (48) - wait (10)
- wednesday? (12)
-
with
_ index (36) -
with
_ object (24) -
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) -
write
_ nonblock (12) - yield (12)
-
yield
_ self (16) - zero? (39)
- zip (72)
- | (42)
- ~ (6)
検索結果
先頭5件
-
String
# b -> String (26108.0) -
self の文字エンコーディングを ASCII-8BIT にした文字列の複製を返します。
...self の文字エンコーディングを ASCII-8BIT にした文字列の複製を返します。
//emlist[例][ruby]{
'abc123'.encoding # => #<Encoding:UTF-8>
'abc123'.b.encoding # => #<Encoding:ASCII-8BIT>
//}... -
Bignum
# bit _ length -> Integer (17101.0) -
self を表すのに必要なビット数を返します。
...-2**10000-1).bit_length # => 10001
(-2**10000).bit_length # => 10000
(-2**10000+1).bit_length # => 10000
(-2**1000-1).bit_length # => 1001
(-2**1000).bit_length # => 1000
(-2**1000+1).bit_length # => 1000
(2**1000-1).bit_length # => 1000
(2**1000).bit_length......# => 1001
(2**1000+1).bit_length # => 1001
(2**10000-1).bit_length # => 10000
(2**10000).bit_length # => 10001
(2**10000+1).bit_length # => 10001
@see Fixnum#bit_length... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (17101.0) -
エラー発生時に捨てられたバイト列を返します。
...][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1\xFFdef")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "\xFF" on EUC-JP>
puts $!.error_bytes.dump #=> "\xA1"
puts $!.readagain_byte......s.dump #=> "\xFF"
end
//}
@see Encoding::InvalidByteSequenceError#readagain_bytes... -
Encoding
:: InvalidByteSequenceError # readagain _ bytes -> String (17101.0) -
エラー発生時に読み直さなければならないバイト列を返します。
...エラー発生時に読み直さなければならないバイト列を返します。
@see Encoding::InvalidByteSequenceError#error_bytes... -
Object
# object _ id -> Integer (17101.0) -
各オブジェクトに対して一意な整数を返します。あるオブジェクトに対し てどのような整数が割り当てられるかは不定です。
...。
Rubyでは、(Garbage Collectされていない)アクティブなオブジェクト間で
重複しない整数(object_id)が各オブジェクトにひとつずつ割り当てられています。この
メソッドはその値を返します。
TrueClass, FalseClass, NilClass, Symbol, Integ......er クラス
のインスタンスなど Immutable(変更不可)なオブジェクトの一部は同じ内容ならば必ず同じ object_id になります。
これは、Immutable ならば複数の場所から参照されても`破壊的操作'による問題が発生しないので、
同......emlist[][ruby]{
p "ruby".object_id #=> 60
p "ruby".object_id #=> 80
p [].object_id #=> 100
p [].object_id #=> 120
p :ruby.object_id #=> 710428
p :ruby.object_id #=> 710428
p 11.object_id #=> 23
p 11.object_id #=> 23
p true.object_id #=> 20
p true.object_id #=> 20
//}
@see Object#equal?,Symbol... -
Thread
:: Backtrace :: Location # base _ label -> String (17101.0) -
self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。
...read::Backtrace::Location#label から修飾を取り除いたもので構成
されます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.base_label
end......# => initialize
# new
# <main>
//}
@see Thread::Backtrace::Location#label... -
Enumerable
# each _ with _ object(obj) {|(*args) , memo _ obj| . . . } -> object (14401.0) -
与えられた任意のオブジェクトと要素をブロックに渡し繰り返し、最初に与えられたオブジェクトを返します。
...返します。
ブロックを省略した場合は Enumerator を返します。
@param obj 任意のオブジェクトを指定します。
//emlist[例][ruby]{
evens = (1..10).each_with_object([]) {|i, a| a << i*2 }
# => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
//}
@see Enumerator#with_object... -
Enumerator
# with _ object(obj) {|(*args) , memo _ obj| . . . } -> object (14401.0) -
繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。
...の各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。
obj には任意のオブジェクトを渡すことができます。
ブロックが渡されなかった場合は、上で説明した繰り返しを実行し、
最後に obj を返す Enumer......][ruby]{
# 0,1,2 と呼びだす enumeratorを作る
to_three = Enumerator.new do |y|
3.times do |x|
y << x
end
end
to_three_with_string = to_three.with_object("foo")
to_three_with_string.each do |x,string|
puts "#{string}: #{x}"
end
# => foo:0
# => foo:1
# => foo:2
//}
@param obj 繰り......返しの各要素に添えて渡されるオブジェクト
@see Enumerable#each_with_object... -
Module
# extend _ object(obj) -> object (14301.0) -
Object#extend の実体です。オブジェクトにモジュールの機能を追加します。
...Object#extend の実体です。オブジェクトにモジュールの機能を追加します。
Object#extend は、Ruby で書くと以下のように定義できます。
//emlist[例][ruby]{
def extend(*modules)
modules.reverse_each do |mod|
# extend_object や extended はプライ......で
# 直接 mod.extend_object(self) などとは書けない
mod.__send__(:extend_object, self)
mod.__send__(:extended, self)
end
end
//}
extend_object のデフォルトの実装では、self に定義されて
いるインスタンスメソッドを obj の特異メソッドとし......て追加します。
@param obj self の機能を追加するオブジェクトを指定します。
@return obj で指定されたオブジェクトを返します。
@see Module#extended... -
ARGF
. class # bytes { |byte| . . . } -> self (14201.0) -
このメソッドは obsolete です。 代わりに ARGF.class#each_byte を使用してください。 使用すると警告メッセージが表示されます。
...このメソッドは obsolete です。
代わりに ARGF.class#each_byte を使用してください。
使用すると警告メッセージが表示されます。...