別のキーワード
種類
ライブラリ
- ビルトイン (4770)
- benchmark (12)
- csv (147)
- drb (12)
- erb (12)
- fiber (8)
- fiddle (36)
- fileutils (14)
- json (672)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (24) -
json
/ add / date _ time (24) -
json
/ add / exception (24) -
json
/ add / range (24) -
json
/ add / rational (12) -
json
/ add / regexp (24) -
json
/ add / struct (24) -
json
/ add / time (24) - kconv (12)
- matrix (120)
- mkmf (12)
-
net
/ http (48) - nkf (12)
- objspace (108)
- open-uri (2)
- openssl (36)
- optparse (36)
- ostruct (12)
- pathname (12)
- pp (40)
- prettyprint (12)
- prime (12)
- psych (198)
- rake (36)
-
ripper
/ filter (12) -
ripper
/ sexp (24) -
rubygems
/ requirement (12) - set (36)
- socket (24)
- stringio (60)
- strscan (24)
-
test
/ unit (1) - thread (12)
- timeout (37)
- uri (24)
- win32ole (36)
クラス
- Addrinfo (12)
- Array (542)
- BasicObject (168)
- BigDecimal (12)
- Binding (47)
- CSV (60)
-
CSV
:: FieldInfo (36) -
CSV
:: Row (39) -
CSV
:: Table (12) - Class (60)
- Complex (36)
-
DRb
:: DRbUnknown (12) - Data (3)
- Date (24)
- DateTime (24)
- Dir (48)
- ERB (12)
- Encoding (60)
- Enumerator (103)
-
Enumerator
:: Lazy (47) -
Enumerator
:: Yielder (24) - Exception (24)
- Fiber (66)
-
Fiddle
:: Pointer (12) - File (24)
-
File
:: Stat (24) - FrozenError (6)
-
Gem
:: Requirement (12) - Hash (265)
- IO (24)
- Integer (22)
-
JSON
:: Parser (36) -
JSON
:: State (240) - Matrix (120)
- Method (68)
- Module (180)
- Mutex (2)
-
Net
:: HTTP (12) -
Net
:: HTTPGenericRequest (12) -
Net
:: HTTPResponse (24) - Numeric (24)
- Object (1027)
-
ObjectSpace
:: WeakMap (12) -
OpenSSL
:: ASN1 :: ASN1Data (12) - OpenStruct (12)
- OptionParser (24)
- PP (12)
- Pathname (12)
- PrettyPrint (12)
- Prime (12)
- Proc (12)
-
Psych
:: Nodes :: Node (24) -
Psych
:: ScalarScanner (12) -
Psych
:: Visitors :: YAMLTree (24) -
Rake
:: TaskArguments (12) - Random (48)
- Range (274)
- Rational (12)
- Regexp (48)
- Ripper (24)
-
Ripper
:: Filter (12) -
RubyVM
:: InstructionSequence (12) - Set (48)
- Socket (12)
- String (117)
- StringIO (60)
- StringScanner (24)
- Struct (107)
- Thread (20)
-
Thread
:: Mutex (10) -
Thread
:: Queue (36) -
Thread
:: SizedQueue (36) - Time (60)
- TracePoint (79)
- UnboundMethod (24)
- UncaughtThrowError (22)
- WIN32OLE (12)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ VARIANT (12)
モジュール
- Benchmark (12)
- Comparable (15)
- Enumerable (637)
- Fiddle (24)
- FileUtils (14)
- GC (12)
- JSON (216)
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kconv (12)
- Kernel (285)
- Marshal (72)
- ObjectSpace (228)
-
OpenSSL
:: ASN1 (24) -
OptionParser
:: Arguable (12) - Psych (102)
-
Rake
:: Cloneable (24) -
RubyVM
:: MJIT (21) -
Test
:: Unit (1) - Timeout (21)
- URI (24)
オブジェクト
- ENV (60)
キーワード
- ! (12)
- != (12)
- !~ (12)
-
$ -K (5) -
$ > (12) -
$ KCODE (5) -
$ SAFE (5) -
$ stderr (12) -
$ stdin (12) -
$ stdout (12) - << (36)
- <=> (12)
- == (24)
- === (44)
- =~ (9)
- ARGV (24)
- BasicObject (12)
-
CODE
_ CLASS _ TO _ OBJ (12) -
CODE
_ TO _ OBJ (12) - Complex (24)
- DATA (12)
-
Data
_ Get _ Struct (12) - FALSE (8)
- JSON (12)
-
MAJOR
_ VERSION (12) -
MINOR
_ VERSION (12) - MJIT (7)
-
NEWS for Ruby 2
. 3 . 0 (10) - NIL (8)
- NKF (12)
- ObjectId (24)
- RSTRING (12)
-
RUBY
_ COPYRIGHT (12) -
RUBY
_ DESCRIPTION (12) -
RUBY
_ ENGINE (12) -
RUBY
_ ENGINE _ VERSION (10) -
RUBY
_ PATCHLEVEL (12) -
RUBY
_ PLATFORM (12) -
RUBY
_ RELEASE _ DATE (12) -
RUBY
_ REVISION (12) -
RUBY
_ VERSION (12) - Rubyの起動 (12)
- Ruby用語集 (12)
-
SCRIPT
_ LINES _ _ (12) -
SHIFT
_ JIS (12) - STDERR (12)
- STDIN (12)
- STDOUT (12)
-
Shift
_ JIS (12) - State (12)
- TRUE (8)
- [] (126)
- []= (12)
-
_ _ id _ _ (12) -
_ _ send _ _ (24) -
_ dump (12) -
_ id2ref (12) - adjugate (12)
- aliases (12)
- allocate (12)
-
allocation
_ sourcefile (12) -
allocation
_ sourceline (12) -
allow
_ nan? (12) - append (8)
-
arg
_ config (12) -
array
_ nl (12) -
array
_ nl= (12) - at (12)
- begin (12)
- bigdecimal (12)
- bind (12)
-
bind
_ call (12) - bmbm (12)
-
body
_ stream (12) - bsearch (36)
- bytes (12)
- call (24)
- catch (24)
- cd (7)
- chdir (31)
-
check
_ circular? (12) -
chunk
_ while (12) - clamp (15)
- class (12)
-
class
_ eval (24) -
class
_ exec (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) - clone (36)
-
cofactor
_ expansion (12) - collect (24)
-
collect
_ concat (24) - column (24)
- compatible? (12)
- component (12)
- configure (12)
- conj (36)
- conjugate (36)
-
connect
_ from (12) -
const
_ get (12) -
const
_ set (12) - convert (36)
- count (24)
-
count
_ nodes (12) -
count
_ objects (12) -
count
_ objects _ size (12) -
count
_ tdata _ objects (12) - cover? (12)
-
create
_ id (12) -
create
_ id= (12) - cycle (24)
- deconstruct (12)
-
def
_ class (12) - default (24)
-
define
_ finalizer (24) -
define
_ singleton _ method (24) - delete (72)
-
delete
_ at (12) - deq (24)
- detect (12)
-
dev
_ major (12) - dig (30)
- disable (12)
- disjoint? (12)
- display (12)
- divide (24)
- dlunwrap (12)
- dlwrap (12)
- dump (36)
-
dump
_ stream (12) - dup (24)
- each (36)
-
each
_ entry (12) -
each
_ object (48) -
each
_ with _ object (24) - element (12)
- enable (12)
- enabled? (7)
- encode (36)
- end (12)
- entries (19)
-
enum
_ for (24) - eql? (12)
- equal? (24)
- eval (48)
- extend (12)
-
extend
_ object (12) - extended (12)
-
fast
_ generate (12) -
fast
_ unparse (12) - feed (12)
- fetch (80)
-
fetch
_ values (20) - field (12)
- filter (21)
-
filter
_ map (6) - find (12)
-
find
_ all (12) -
find
_ index (12) - first (48)
-
flat
_ map (24) - force (12)
- format (12)
- freeze (12)
-
from
_ state (12) - frozen? (12)
-
garbage
_ collect (12) - generate (12)
- getlocal (24)
- grep (24)
-
grep
_ v (24) -
group
_ by (12) - handler= (12)
- hash (12)
- header (12)
- id2ref (12)
- include? (12)
- indent (12)
- indent= (12)
- index (19)
- initialize (12)
-
initialize
_ copy (12) - inject (36)
- inspect (12)
- instance (12)
-
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) -
is
_ a? (12) - isjis (12)
- itself (12)
- jj (12)
- join (48)
- json (12)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / core (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / ostruct (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / symbol (12) -
json
/ add / time (12) -
json
_ creatable? (12) -
json
_ create (96) - key (12)
- keys (12)
-
kind
_ of? (12) -
laplace
_ expansion (12) - last (36)
-
latest
_ gc _ info (12) - line (12)
- ljust (12)
- load (39)
-
load
_ documents (8) -
load
_ file (24) -
load
_ file! (12) -
load
_ stream (24) -
local
_ variable _ get (12) -
local
_ variable _ set (12) - loop (12)
- map (24)
-
marshal
_ dump (12) -
marshal
_ load (12) - match (24)
- max (88)
-
max
_ by (12) -
max
_ nesting (12) -
max
_ nesting= (12) - member? (12)
-
memsize
_ of (12) -
memsize
_ of _ all (12) - merge (12)
- method (12)
-
method
_ missing (12) - methods (12)
- min (88)
-
min
_ by (12) - minmax (48)
-
minmax
_ by (12) -
module
_ eval (24) -
module
_ exec (12) -
name
_ list (12) - new (115)
- next (12)
- none? (19)
-
object
_ id (12) -
object
_ nl (12) -
object
_ nl= (12) - one? (19)
- open (74)
- p (12)
- pack (21)
- pack テンプレート文字列 (12)
- parameters (31)
- parse (60)
- parse! (12)
- parser (12)
- partition (12)
- pause (7)
- peek (12)
- pop (36)
- pp (24)
- prepend (8)
-
pretty
_ generate (12) -
pretty
_ print (12) -
pretty
_ print _ cycle (12) -
pretty
_ unparse (12) - print (12)
- printf (12)
-
psych
_ y (12) -
public
_ method (12) -
public
_ send (24) - push (24)
- putc (24)
- puts (12)
- raise (18)
- rand (36)
- rassoc (12)
-
rb
_ Integer (12) -
rb
_ data _ object _ alloc (12) -
rb
_ jump _ tag (12) -
rdev
_ major (12) -
rdoc
/ code _ objects (12) -
reachable
_ objects _ from (12) - receiver (29)
- reduce (36)
- reject (132)
- reject! (84)
- reload (12)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) -
respond
_ to? (12) -
respond
_ to _ missing? (12) - restore (24)
- resume (19)
-
return
_ value (12) - rjust (12)
-
ruby 1
. 6 feature (12) -
safe
_ load (19) - sample (24)
-
scan
_ full (12) -
search
_ full (12) - select (36)
- self (12)
- send (24)
-
setup
_ argv (1) - sexp (12)
-
sexp
_ raw (12) - shift (48)
-
singleton
_ class (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) - slice (12)
- slice! (12)
-
slice
_ when (23) - sort (24)
-
sort
_ by (12) - source (12)
- space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) - start (12)
- state (12)
- store (12)
- strftime (12)
- sum (42)
- synchronize (12)
- tag (11)
- taint (9)
- tainted? (9)
- tap (12)
- tcp (12)
-
test
/ unit (1) - then (14)
- timeout (37)
-
to
_ a (43) -
to
_ ary (12) -
to
_ c (12) -
to
_ enum (24) -
to
_ h (24) -
to
_ hash (24) -
to
_ int (12) -
to
_ json (240) -
to
_ proc (12) -
to
_ regexp (12) -
to
_ ruby (12) -
to
_ s (12) -
to
_ str (12) -
to
_ value (12) - tokenize (12)
- trace (12)
-
trace
_ object _ allocations (12) - transfer (12)
- transform (12)
- trust (9)
-
try
_ convert (52) -
unconverted
_ fields? (12) -
undefine
_ finalizer (12) - unpack (12)
- unpack1 (9)
- unparse (12)
- unshift (12)
- untaint (9)
- untrust (9)
- untrusted? (9)
- value (35)
- values (24)
-
values
_ at (24) -
with
_ index (12) -
with
_ object (24) - write (12)
- y (12)
-
yaml
_ tag (12) - yield (24)
-
yield
_ self (16) - zip (24)
- オブジェクト (12)
- 制御構造 (12)
- 正規表現 (12)
検索結果
先頭5件
-
Kernel
# j(*objects) -> nil (18113.0) -
与えられたオブジェクトを JSON 形式の文字列で標準出力に一行で出力します。
...与えられたオブジェクトを JSON 形式の文字列で標準出力に一行で出力します。
@param objects JSON 形式で出力したいオブジェクトを指定します。
//emlist[例][ruby]{
require "json"
j([1,2,{"name" => "tanaka","age" => 19}])
# => [1,2,{"name":"tanaka","... -
ObjectSpace
. # each _ object {|object| . . . } -> Integer (9218.0) -
指定された klass と Object#kind_of? の関係にある全ての オブジェクトに対して繰り返します。引数が省略された時には全てのオブ ジェクトに対して繰り返します。 繰り返した数を返します。
...指定された klass と Object#kind_of? の関係にある全ての
オブジェクトに対して繰り返します。引数が省略された時には全てのオブ
ジェクトに対して繰り返します。
繰り返した数を返します。
ブロックが与えられなかった場合......//emlist[例: ブロックなし][ruby]{
p ObjectSpace.each_object
# => #<Enumerator: ObjectSpace:each_object(false)>
//}
//emlist[例: 全てのオブジェクトを扱う][ruby]{
ObjectSpace.each_object.take(5).each { |x| p x }
count = ObjectSpace.each_object { |x| x }
puts "Total count: #{coun......s"
# => "@corrections"
# => Total count: 9938
//}
//emlist[例: 任意のクラスを扱う][ruby]{
Person = Struct.new(:name)
s1 = Person.new("tanaka")
s2 = Person.new("sato")
count = ObjectSpace.each_object(Person) { |x| p x }
puts "Total count: #{count}"
# => #<struct Person name="sato">
# =>... -
ObjectSpace
. # each _ object(klass) {|object| . . . } -> Integer (9218.0) -
指定された klass と Object#kind_of? の関係にある全ての オブジェクトに対して繰り返します。引数が省略された時には全てのオブ ジェクトに対して繰り返します。 繰り返した数を返します。
...指定された klass と Object#kind_of? の関係にある全ての
オブジェクトに対して繰り返します。引数が省略された時には全てのオブ
ジェクトに対して繰り返します。
繰り返した数を返します。
ブロックが与えられなかった場合......//emlist[例: ブロックなし][ruby]{
p ObjectSpace.each_object
# => #<Enumerator: ObjectSpace:each_object(false)>
//}
//emlist[例: 全てのオブジェクトを扱う][ruby]{
ObjectSpace.each_object.take(5).each { |x| p x }
count = ObjectSpace.each_object { |x| x }
puts "Total count: #{coun......s"
# => "@corrections"
# => Total count: 9938
//}
//emlist[例: 任意のクラスを扱う][ruby]{
Person = Struct.new(:name)
s1 = Person.new("tanaka")
s2 = Person.new("sato")
count = ObjectSpace.each_object(Person) { |x| p x }
puts "Total count: #{count}"
# => #<struct Person name="sato">
# =>... -
Object
:: RUBY _ ENGINE -> String (9153.0) -
Ruby処理系実装の種類を表す文字列。
...Ruby処理系実装の種類を表す文字列。
例:
$ ruby-1.9.1 -ve 'p RUBY_ENGINE'
ruby 1.9.1p0 (2009-03-04 revision 22762) [x86_64-linux]
"ruby"
$ jruby -ve 'p RUBY_ENGINE'
jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [i386-java]
"jruby"... -
Object
# object _ id -> Integer (9136.0) -
各オブジェクトに対して一意な整数を返します。あるオブジェクトに対し てどのような整数が割り当てられるかは不定です。
...ジェクトに対し
てどのような整数が割り当てられるかは不定です。
Rubyでは、(Garbage Collectされていない)アクティブなオブジェクト間で
重複しない整数(object_id)が各オブジェクトにひとつずつ割り当てられています。この......じ 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... -
Object
:: RUBY _ PATCHLEVEL -> Integer (9135.0) -
Ruby のパッチレベルを表す Integer オブジェクトです。
...Ruby のパッチレベルを表す Integer オブジェクトです。
パッチレベルはRubyの各バージョンに対するバグ修正パッチの適用をカウントしています。
teeny リリースのそれぞれについてパッチレベルは 0 から始まり、
その teeny リ......ースに対してバグ修正パッチが適用される度に増えていきます。
パッチレベルという概念および RUBY_PATCHLEVEL 定数は、 Ruby 1.8.5-p1 以降、 1.8.6 以降で導入されました。
1.8.5やそれ以前のバージョンでは定義されていません。... -
ObjectSpace
. # count _ tdata _ objects(result _ hash = nil) -> Hash (9124.0) -
T_DATA の種類ごとにオブジェクトの数を格納したハッシュを返します。
...します。
本メソッドは普通の Ruby プログラマ向けのメソッドではありません。パフォー
マンスに興味のある C Ruby の開発者向けのものです。
//emlist[例][ruby]{
ObjectSpace.count_tdata_objects
# => {RubyVM::InstructionSequence=>504, :parser=>5, :b......arrier=>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}
//}
現在のバージョンでは、戻り値のキーはクラスオブジェクトか......、キーはシンボルです。シンボルの値は
rb_data_type_struct に格納された名前が使用されます。
戻り値のハッシュは処理系に依存します。これは将来変更になるかもしれません。
本メソッドは C Ruby 以外では動作しません。... -
ObjectSpace
. # reachable _ objects _ from(obj) -> Array | nil (9124.0) -
obj から到達可能なすべてのオブジェクトを返します。マーク不能なオブジェ クトを指定した場合は nil を返します。本メソッドを使う事でメモリリークの 調査が行えます。
...obj から到達可能なすべてのオブジェクトを返します。マーク不能なオブジェ
クトを指定した場合は nil を返します。本メソッドを使う事でメモリリークの
調査が行えます。
//emlist[例][ruby]{
# 配列クラス(Array)と 'a'、'b'、'c'......に到達可能。
ObjectSpace.reachable_objects_from(['a', 'b', 'c'])
# => [Array, 'a', 'b', 'c']
//}
obj が 2 つ以上の同じオブジェクト x への参照を持つ場合、戻り値に含まれ
るオブジェクト x は 1 つだけです。
//emlist[例][ruby]{
# 配列クラス(Array......)と v に到達可能。
ObjectSpace.reachable_objects_from([v = 'a', v, v])
# => [Array, 'a']
# 配列クラス(Array)と 3 つの異なる 'a' オブジェクトに到達可能。
ObjectSpace.reachable_objects_from(['a', 'a', 'a'])
# => [Array, 'a', 'a', 'a']
//}
obj にマーク不能なオブ... -
Object
:: RUBY _ DESCRIPTION -> String (9123.0) -
Ruby の詳細を表す文字列。
...Ruby の詳細を表す文字列。
ruby -v で表示される内容が格納されています。...